The president of Ukraine has on Wednesday ended the state of martial law that he had decreed a month ago for parts of his country.

Petro Poroshenko imposed martial law on Nov. 26 following the capture of three Ukranian navy ships and 24 sailors by Russian forces.

"Today, Dec. 26, at 14:00, martial law ends. This is my fundamental decision, it is based on the analysis of all the components of the current security situation in Ukraine," Poroshenko said in his official Twitter account.

Ukraine's armed forces had been placed on combat readiness and reservists were called up during martial law, while Russian men aged 16-60 were stopped from entering the country.

Poroshenko said the threat that Russia posed had not diminished and had it not been for the upcoming election that is scheduled for early next year, he would have urged parliament to extend the period of martial law.

"We will protect democracy," Poroshenko said. "We guarantee that the presidential election will be held on March 31, 2019," he added.

The president also regretted not being able to repatriate the sailors that Russia had captured.

"Unfortunately, it was not possible to return the 24 Ukrainian sailors home," he said. "It is very important that 22 of you have clearly stated that you are prisoners according to the Geneva Convention. Russia has committed and is responsible for an act of aggression," he said.