The Nicaraguan Congress has approved a proposal to have a canal built linking the Pacific and the Atlantic Oceans.
A Hong Kong-based company has been granted a 50-year concession to build the waterway, which will rival the Panama Canal.
The $40bn (£25bn) plan has been criticised by environmentalists, who say cargo ships will create a permanent risk to Lake Nicaragua.
But President Daniel Ortega says the project will bring prosperity.
Nicaraguan leaders have for centuries dreamt of building a canal linking its Caribbean coast to the Pacific.
Several initiatives failed and the project suffered what seemed to be a final blow when the United States decided to build a canal in Panama, which opened in 1914.
"One of Nicaragua's great riches is its geographic position, that's why this idea has always been around,'' Sandinista government congressman Jacinto Suarez in Congress on Thursday.
"Opposing it is unpatriotic,'' he added.
The projected was approved in Congress by 61 to 28 votes.
A Chinese company - the Hong Kong Nicaragua Canal Development Investment Co - was chosen to carry out the project.
Critics say the company lacks the necessary experience to undertake such a huge project.
The concession can be extended for another 50 years once the canal is operational.
The Nicaraguan government will get a minority share of the profits generated by the canal.