Poroshenko celebrated the soldiers' "heroism" by proclaiming the industrial Sea of Azov city of half-a-million people the new temporary capital of Donetsk -- an eastern rustbelt region overrun by pro-Russian gunmen for the past two months.
The 48-year-old chocolate baron rose to power in a snap May 25 ballot called after the February ouster of a Russian-backed leader by vowing to move Ukraine closer to Europe and end fighting that has claimed 270 lives.
Poroshenko's troubles have been compounded by the threat of Ukraine being cut off from economically-vital Russian gas shipments as early as Monday morning because of a bitter price dispute.
Mariupol has wavered between rebel and Kiev control for weeks and was also the scene of pitched battles on May 9 that killed more than a dozen people.
Also Read
The bustling port provides access to the main highway linking other regions with Russia and is the main export channel for coal and industrial products fundamental to Ukraine's economic growth.
His deputy told reporters that 30 pro-Russian gunmen had been captured in a coordinated push involving special forces that saw rebels driven from the city's seat of power they had reoccupied about a month ago.
"Thanks to the heroism shown by Ukrainian soldiers in Mariupol, the situation in the city has been stabilised," Poroshenko's office said in a statement.
"In light of this, it would be prudent to transfer the operation of the Donetsk regional administration to Mariupol," he wrote.