Poroshenko said martial law was necessary to bolster Ukraine's defences after Russia seized three Ukrainian naval ships and took their crews prisoner at the weekend.
Parliament approved the introduction of martial law after Poroshenko reassured some sceptical lawmakers that it would not be used to curb civil liberties or delay elections scheduled for next year.
It came at the end of a day when Ukraine and Russia traded accusations about Sunday's standoff and Kiev's allies weighed in to condemn Moscow's behaviour.
With relations still raw after Russia's 2014 annexation of Crimea from Ukraine and its backing for a pro-Moscow insurgency in eastern Ukraine, the crisis risked pushing the two countries into open conflict.
"Russia has been waging a hybrid war against our country for a fifth year. But with an attack on Ukrainian military boats it moved to a new stage of aggression," Poroshenko said.
U.S. President Donald Trump said he did not like what was happening between Russia and Ukraine and was working with European leaders on the situation.
In a phone call with Poroshenko, NATO Secretary General Jens Stoltenberg offered the alliance's "full support for Ukraine's territorial integrity and sovereignty." Ukraine is not a NATO member though it aspires to membership.
Washington's envoy to the United Nations said Russia's actions were an "outrageous violation of sovereign Ukrainian territory" and sanctions on Russia would remain in place.
The European Union, Britain, France, Poland, Denmark, and Canada all condemned what they called Russian aggression. German Chancellor Angela Merkel stressed the need for dialogue.
The stand-off in the Azov Sea is more combustible now than at any time in the past four years as Ukraine has rebuilt its armed forces, previously in disarray, and has a new generation of commanders who are confident and have a point to prove.
Russia's foreign ministry blamed Kiev for the crisis.
"It's obvious that this painstakingly thought-through and planned provocation was aimed at igniting another source of tension in the region in order to create a pretext to ramp up sanctions against Russia," it said in a statement.
Such a policy was "fraught with serious consequences", it said, adding that Kiev was acting in coordination with the United States and the European Union.
Russia summoned the ranking diplomat at Kiev's embassy in Moscow over the incident, the foreign ministry said.
In Kiev, Poroshenko said intelligence data suggested there was an "extremely serious threat" of a land-based operation against Ukraine by Russia.
"I have a document of intelligence in my hands...Here on several pages is a detailed description of all the forces of the enemy located at a distance of literally several dozens of kilometers from our border. Ready at any moment for an immediate invasion of Ukraine," he said.
Martial law would allow Ukraine to respond swiftly to any invasion and mobilise resources as quickly as possible, he said.
He dismissed "dirty speculation" by critics that he wanted to use the proposed measure to delay elections next year, where he faces a tough re-election fight and opinion polls show him trailing his opponents. Ukrainian lawmakers held a second vote to confirm the polls would take place as scheduled on March 31.
UKRAINIANS WOUNDED, VESSELS HELD
Russia's rouble currency weakened 1.4 percent against the dollar in Moscow on Monday, its biggest one-day fall since Nov. 9, while Russian dollar-bonds fell.
Markets are highly sensitive to anything that could trigger new Western sanctions, and therefore weaken the Russian economy. A fall in the price of oil -- Russia's biggest source of revenue -- has made its economy more vulnerable.
The crisis erupted when border patrol boats belonging to Russia's FSB security service seized two small Ukrainian armoured artillery vessels and a tug boat after opening fire on them and wounding three sailors on Sunday.
Interfax news agency quoted Russia's human rights commissioner, Tatyana Moskalkova, as saying on Monday that 24 Ukrainian sailors were being detained. Three of the sailors were wounded but were not in a serious condition and were recovering in hospital.
The FSB said the Ukrainian ships had ignored warning shots, forcing Russian vessels to open fire for real, after they illegally entered Russian territorial waters.
A Reuters witness in Kerch, a port in Crimea, said the three Ukrainian vessels were being held there on Monday.
Domestic politics in Moscow also add to the combustibility of the situation.
Russian President Vladimir Putin has seen his high approval rating fall because of unpopular domestic policies. In the past, successful military action beyond Russia's borders has buoyed his popularity.
Tensions have been long brewing over the Azov Sea. Crimea, on the western shore, is now controlled by Moscow, the eastern shore is Russian territory, and the northern shore is controlled by Ukraine.
(Additional reporting by Tom Balmforth and Polina Ivanova in Moscow, Stine Buch Jacobsen in Copenhagen, Karin Strohecker in London, Joanna Plucinska in Warsaw, and European bureaux Writing by Andrew Osborn/Christian Lowe/Matthias Williams Editing by Richard Balmforth and Angus MacSwan)
(This story has not been edited by Devdiscourse staff and is auto-generated from a syndicated feed.)