MOSCOW — Russia’s prime minister submitted his resignation Wednesday as part of a surprise government shake-up directed by President Vladi­mir Putin as he looks to ensure his influence after his term ends in 2024.

Putin accepted the resignation of the prime minister, Dmitry Medvedev, his longtime ally and political partner who once served as president. Medvedev, however, will remain in Russia’s power structure as the Security Council’s deputy chairman, which has been compared to a vice presidency.

The sweeping moves came shortly after Putin gave his annual address to Russian lawmakers and proposed major constitutional changes that included transferring more power to parliament, including the ability to name the country’s prime minister. Currently, the post is selected by the president.

Putin also called for “enshrining” the state council, an advisory body to the president, in what could be a path for him to maintain significant influence in a different capacity once this presidential term is finished in four years.

Medvedev’s resignation means the entire ministerial cabinet is out, too, but it’s expected to remain in place until a new government is formed. Putin also gave no immediate indication on Medveduv’s successor.

“For my part, I also want to thank you for everything that was done at this stage of our joint work, I want to express satisfaction with the results that have been achieved,” the president told a meeting of the Cabinet.

“Not everything was done, but everything never works out in full,” Putin said, without giving details.

Medvedev served as Russia’s prime minister since 2012. He spent four years before that as president in 2008-2012.

Medevedev said the decision to resign was because the constitutional changes, when passed, will affect the whole balance of the executive, legislative, and judicial branches of government.

“In this context, it is obvious that we as the government should allow our country's president to make all necessary decisions before that,” he said.

Medvedev’s move to Russia’s Security Council, second to only Putin, has added to speculation that Putin may be looking to copy the path of a Soviet republic, Kazakhstan, on how to retain power past his presidency. Last March, Kazakhstan's long-serving president, Nursultan Nazarbayev, stepped down but became Chairman of the Security Council for life — making him the effective power broker.

In his speech to parliament Wednesday, Putin again suggested limiting presidential term limits to two. That indicated, he won’t attempt to seek a third consecutive term. He also set out plans to shift power away from the presidency to the lower house of parliament — a move that erode the influence of his successor.

“This is all about how to influence the prerogatives of the future president,” said Tatiana Stanovaya, the head of a think tank called R. Politik. “Putin would like to have some leverage, some mechanism to control and to get involved in case his successor makes mistakes or has some disagreements with him.”

After Putin served two presidential terms from 2000 to 2008, he swapped places Medvedev, who served one term. Medvedev was widely seen as a caretaker, enabling Putin to retain power behind the scenes, but there was also believed to be a rift between the two halfway through Medvedev’s presidency. Putin then took over the presidency in 2012 and was reelected last year.

Stanovaya considers it unlikely Putin would want to be prime minister again after his presidency, but a role on a beefed-up state council could be appealing to him.

“He doesn’t want to get engaged in routine social and economic policy, like the budget — it’s boring for him,” she said. “He wants to focus on foreign policy, and I think the state council is much more convenient for him. But for that, he will need to make it a constitutional body and significantly enlarge its possibilities.”

Putin concluded his speech, which lasted slightly more than an hour, by saying those changes must be approved at a national referendum, Russia’s first since 1993. But if that referendum will actually occur is unclear. Ella Pamfilova, the head of Russia's Central Election Commission, told Russian news agency Interfax, “I don't think it will go as far as a referendum,” adding that “there are other forms of debate.”

Other constitutional changes included limiting the supremacy of international law, raising the residency requirements for presidential candidates from 10 years to 25 years, giving the Russian constitutional Court the right to verify whether adopted laws are in compliance with the constitution before they are signed by the president, prohibiting civil servants from holding foreign citizenship and adding a provision to keep minimum wage and pension above the official poverty line.

“Our society is clearly demonstrating a demand for change,” Putin said at the start of the address.

The annual speech to top Russian officials and members of parliament largely focused on how to improve domestic living standards. Putin opened with initiatives to improve Russia’s demographics by proposing financial incentives for citizens who have children and then addressed low teacher salaries, boosting their monthly wages by roughly $80. He also touched on health care and environmental issues.

Putin’s approval ratings remain high — at about 68 percent, according to a December poll from the Levada-Center — but it has been gradually declining due to a stagnant economic growth and unpopular moves in recent years to raise the retirement age and increase taxes on goods and services.

Wednesday’s state-of-the-nation address was his first to be projected across several large buildings in Moscow. Putin also pointed out that the speech was unique in how early it was delivered; typically such speeches are given in February or March.

“We need to expedite achievement of the large-scale social, economic and technological challenges our country faces,” he said.