The SS Nomadic, the last of the White Star ships and a vital link to the Titanic story, is returning to Belfast.
The Nomadic took passengers out to the Titanic
The Northern Ireland Office bought the ship at an auction in Paris for £171,320.
Social Development Minister David Hanson said his department had been hoping to buy the vessel for some time.
"My department has been working behind the scenes since before Christmas to establish the case for acquiring this historic vessel," he said.
"It was necessary to maintain confidentiality round this work to ensure that government's bidding for the Nomadic at open auction was not compromised."
The luxury ferry, built by Harland & Wolff in Belfast the year before Titanic, took first class passengers to the great liner which sank with the loss of more than 1,500 people in 1912.
Campaigners had been lobbying the government in an attempt to take the ship back to Belfast.
Mr Hanson also announced the setting up of a charitable trust to coordinate fundraising and oversee the restoration of the Nomadic.
"Belfast Harbour Commissioners have agreed to provide a berth for the ship to allow the trust time to take forward the restoration project," he said.
"While no further public funding is available for the cost of restoration, I greatly welcome the contribution of £100,000 pledged by Belfast City Council."
He added: "If the trust is unable to progress the fundraising and restoration over the next 18 months, the vessel will be sold to prevent it deteriorating."
DUP East Belfast MP Peter Robinson said the ship could become the new centrepiece for the Titanic Quarter of the city.
"I look forward to the prospect of this last White Star Line ship becoming the focal point of a world class visitor centre in the Titanic Quarter area," he said.
"A fully restored Nomadic berthed in the area will bring the prospect of even more job opportunities and improved economic prosperity."
Prior to the auction, Sinn Fein councillor Michael Browne said he was concerned at the cost of such an enterprise.
Alliance assembly member Sean Neeson, who represents Northern Ireland on the UK Historic Ships Committee, said the ship could help develop the city's links with the Titanic.
"The main priority now is to get the ship listed on the core collection of the National Historic Ships register," he said.
"If this is achieved, then it would make the Nomadic eligible for possible grant aid from the Heritage Lottery Fund."
The reserve price on the Nomadic had been £165,000.
Following a public appeal, £40,000 was raised in private pledges and Belfast City Council agreed to contribute £100,000.
The 221st ship ferried passengers to the White Star liner Olympic, and in April 1912, it did the same job for Titanic.
Nomadic saw service in both world wars and was later used as a restaurant on the Seine in Paris.
More recently, it has been languishing semi-derelict in the port of Le Havre.
The Titanic sank on its maiden voyage to New York
A feasibility study by Belfast City Council estimated the cost of buying the ship and bringing it back to the city would be around £750,000.
It would then need about £7m to restore the ship to its former glory.
Campaigners, including Belfast Industrial Heritage, had been behind efforts to bring Nomadic back to the city where it was made.
It is hoped that the ship will become the centrepiece of a new tourist quarter dedicated to the world's most famous ship.
Other attractions include the slipway where Titanic was built, the drawing offices where the blueprints for the ship were drawn and the Thompson Dock and pump house where she was fitted out.
Titanic entered into legend in 1912 when more than 1,500 people died during its maiden voyage from the UK to America.