Vladimir Putin has said he will abide by a rule banning the Russian president from serving two consecutive terms, indicating he will step down from his post in 2024 when his term expires.

But his remarks, made to reporters at an economic forum in St Petersburg and broadcast on state TV, do not necessarily mean he will relinquish power in six years’ time.

Mr Putin stepped down as president in 2008 after serving two successive terms. He then returned in 2012 after a spell as prime minister – a manoeuvre he would be legally able to complete again.

Asked if and when he would be leaving office, he said: “I have always strictly abided by and abide by the constitution of the Russian Federation.

“In the constitution it’s clearly written that nobody can serve more than two terms in a row ... I intend to abide by this rule.”

Mr Putin won a landslide victory in elections in March that extended his tenure by six years. If Mr Putin remains in power until 2024, he will have been either in direct or indirect control of Russia for 24 years, making him Moscow’s longest-serving leader since Josef Stalin.

The St Petersburg International Economic Forum was also used by the Russian president to warn the US’ exit from the Iran nuclear deal could trigger dangerous instability.

“We can’t sort things out with North Korea. Do we want another problem on the same scale?” he asked.

The 65-year-old also attacked the harsh sanctions levied at Russia, which are starting to cut deep into the economy, saying they were a result of “protectionism”, “arbitrariness” and “connivance” by Russia’s enemies.

Mr Putin said Russia understood the need to move away from confrontation with the West, adding officials “certainly can’t be happy” with current Russia-US relations and Moscow was “ready for dialogue”.

Vladimir Putin's Photo ops – Russia's Man of Steel? Show all 20 1 /20 Vladimir Putin's Photo ops – Russia's Man of Steel? Vladimir Putin's Photo ops – Russia's Man of Steel? Vladimir Putin is pictured with a horse during his vacation outside the town of Kyzyl in Southern Siberia on August 3, 2009. Getty Vladimir Putin's Photo ops – Russia's Man of Steel? Vladimir Putin aims at a whale with an arbalest to take a piece of its skin for analysis on the Olga Bay, some 240 kilometres north-east of Nakhodka on August 25, 2010. Getty Vladimir Putin's Photo ops – Russia's Man of Steel? Vladimir Putin plunges into the icy waters of lake Seliger during the celebration of the Epiphany holiday in Russia's Tver region AFP/Getty Vladimir Putin's Photo ops – Russia's Man of Steel? Vladimir Putin (top) takes part in a judo training session at the "Moscow" sports complex in St. Petersburg, on December 22, 2010. Getty Vladimir Putin's Photo ops – Russia's Man of Steel? Vladimir Putin works out at a gym at the Bocharov Ruchei state residence in Sochi on August 30, 2015. Getty Vladimir Putin's Photo ops – Russia's Man of Steel? Vladimir Putin fishes in the remote Tuva region in southern Siberia. The picture taken between August 1 and 3, 2017. Getty Vladimir Putin's Photo ops – Russia's Man of Steel? Vladimir Putin (L) and the leader of the Night Wolves biker group, Alexander Zaldostanov (R), also known as the Surgeon, ride motorcycles on August 29, 2011 at a bikers' festival in the Black Sea port of Novorossiysk, Russia. Putin described leather-clad bikers as brothers and boasted of the "indivisible Russian nation" after roaring into a biking rally on a Harley Davidson. Getty Vladimir Putin's Photo ops – Russia's Man of Steel? Vladimir Putin wears glasses as he visits the Technology Park of the Novosibirsk Academic Town in Novosibirsk on February 17, 2012. Getty Vladimir Putin's Photo ops – Russia's Man of Steel? Vladimir Putin rides a horse during his vacation outside the town of Kyzyl in Southern Siberia on August 3, 2009. Getty Vladimir Putin's Photo ops – Russia's Man of Steel? Vladimir Putin holds a pistol during his visit to a newly-built headquarters of the Russian General Staff's Main Intelligence Department (GRU) in Moscow, 08 November 2006. ?Some countries are seeking to untie their hands in order to take weapons to outer space, including nuclear weapons,? Putin said at the Chief Military Intelligence Department on Wednesday. Getty Vladimir Putin's Photo ops – Russia's Man of Steel? Vladimir Putin sits inside a T-90AM tank during a visit to an arms exhibition in the Urals town of Nizhny Tagil on September 9, 2011 Getty Vladimir Putin's Photo ops – Russia's Man of Steel? Vladimir Putin wears a helmet and the uniform of the Renault Formula One team before driving a F1 race car on a special track in Leningrad region outside St. Petersburg on November 7, 2010. Getty Vladimir Putin's Photo ops – Russia's Man of Steel? Vladimir Putin guides a boat during his vacation in the remote Tuva region in southern Siberia. The picture taken between August 1 and 3, 2017. Getty Vladimir Putin's Photo ops – Russia's Man of Steel? Vladimir Putin hunts fish underwater in the remote Tuva region in southern Siberia. The picture taken between August 1 and 3, 2017. Getty Vladimir Putin's Photo ops – Russia's Man of Steel? Vladimir Putin is seen at the Russian boxing team training club after casting his vote for the Russian Presidential election, 14 March 2004 in Moscow. Putin coasted to a landslide victory with 69.0 percent of the vote in Sunday's election, according to the first exit poll aired on Russian television moments after voting ended across the country's 11 time zones. AFP/Getty Images Vladimir Putin's Photo ops – Russia's Man of Steel? Russian President Vladimir Putin poses for a picture inside the Tupolev-160 strategic bomber jet at the Moscow's Chkalovsky military airport, 16 August 2005. President Vladimir Putin took off from Moscow for a supersonic flight in a cruise-missile carrying Tupolev-160 bomber jet, the latest in the Russian leader's action-packed public appearances. After a health check, Putin donned a flight suit and took the commander's position in the strategic bomber, which was piloted by Major General Anatoly Zhikharev, with a colonel and a lieutenant colonel in charge of navigation, Russian media reported. Getty Vladimir Putin's Photo ops – Russia's Man of Steel? A picture released on March 6, 2010 shows Vladimir Putin look through binoculars in the Karatash area, near the town of Abakan, during his working trip to Khakassia, on February 25, 2010. Getty Vladimir Putin's Photo ops – Russia's Man of Steel? Vladimir Putin measuring a polar bear on the island Alexandra Land, part of the Franz Josef Land archipalego in the Arctic Ocean. Putin, better known in the West for his tough-guy image, expressed concern for the fate of Arctic polar bears threatened by climate change. "The polar bear is under threat. Their population is currently only 25,000 individuals," Putin was quoted by Russian news agencies as saying Getty Vladimir Putin's Photo ops – Russia's Man of Steel? Vladimir Putin carries a hunting rifle during his trip in Ubsunur Hollow Biosphere Reserve in Tuva Republic in this undated picture released on October 30, 2010 by RIA Novosti news agency. Getty Vladimir Putin's Photo ops – Russia's Man of Steel? Russian President Vladimir Putin pilots a motorized hang glider while flying with cranes as he takes part in a scientific experiment as part of the "Flight of Hope", which aims to preserve a rare species of - cranes on September 5, 2012. At the helm of a motorized hang glider that the birds have taken as their leader, Putin made three flights - the first to get familiar with the process, and two others with the birds. AFP/Getty

But he also said Russia would always choose what it considered the greater good over immediate financial hardship.

“Every nation has national interests and priorities,” he said. “But if we have a choice of sovereign state or restrictions, we will always go for the first one.”