Russia's prime minister and its entire government resigned Wednesday as part of sweeping constitutional changes that could see President Vladimir Putin extend his hold on power.

In his annual state of the nation speech, Putin said he favored changing the constitution to hand the State Duma, the lower house of parliament, the power to choose Russia's prime minister and other key positions.

"Of course, these are very serious changes to the political system," Putin said, adding that he thought the parliament and the civil society were ready for the changes.

"It would increase the role and significance of the country's parliament ... of parliamentary parties, and the independence and responsibility of the prime minister."

Prime Minister Dmitry Medvedev, Putin's longtime trusted ally, said Wednesday that the government he heads was resigning to give the president room to carry out the changes he wants to make to the constitution.

Download the NBC News app for breaking news and politics

Medvedev made the announcement on state television, sitting next to Putin who thanked him for his work.

Putin said that Medvedev would take on a new job as the deputy head of Russia's Security Council, which the president currently chairs.

He also nominated tax chief Mikhail Mishustin to serve as the new prime minister, the Russian state news agency TASS reported.

Putin also asked for the outgoing government to remain at work until a new government was appointed.

Despite the proposed changes, Putin said Russia should remain a strong presidential republic, with the president remaining in charge of setting the parliament's priorities, the Russian army and law enforcement.

But he stressed the need for public discussion and called for a nationwide vote on the changes.

“The opinion of the people as the main source of power should be defining,” Putin said. “People decide everything in the end.”

Members of the audience including ministers and high-ranking officials, listened carefully — some taking notes.

Putin, who has been in power for almost two decades as either president or prime minister, is due to complete his fourth presidential term in 2024, after which the constitution would bar him from immediately running for president again.

Medvedev was widely regarded as a "placeholder president" when he took the top job between 2008 and 2012, allowing Putin to serve as the prime minister and observe constitutional term limits.

The latest changes highlight the importance of Medvedev to Putin, said Emily Ferris, a Russia research fellow at the Royal United Services Institute, a London think tank.

"Medvedev’s political demise has been predicted for several years now, but he is yet to leave the scene," Ferris said. "This latest decision indicates that Medvedev has been offered a future in politics, and the message seems to be that Putin loyalists will be rewarded."

The move follows months of speculation in the Russian media about whether Putin will attempt to stay in power beyond 2024 without changing the constitution or forming a unified state with friendly neighbor Belarus.

Critics have suggested he is considering various options to remain at the helm, including by shifting power to parliament and then assuming an enhanced role as prime minister after he steps down in four years.

Another option often mentioned is his heading a state council, a body that Putin said Wednesday he thought should be given more powers under the constitution.

Anatoly Aksakov, the chairman of the State Duma Finance Committee, said Putin had "emphasized that the people are waiting for changes."

"These tasks can only be solved if you respond to the requests of the population," he told TASS. "And the demands of the population are a request for change. Apparently, he felt it necessary to respond to this request in this way."

Alexei Navalny, one of the most vocal opposition leaders and an anti-corruption activist, tweeted in response to Putin's announcement: “The main point of Putin’s message: what kind of idiots (and/or crooks) are all those who said Putin will leave in 2024. Remaining a life-long only leader, taking ownership of the entire country, appropriating its wealth for himself and his friends — that is the only goal of Putin and his regime."

Navalvny has for years been accusing Putin and his entourage of rampant corruption.

In a widely anticipated win, Putin was re-elected in 2018 with 77 percent of the vote.

He remains popular with many Russians, although his trust ratings have taken a beating after the introduction of a very unpopular pension reform in 2018.

A public opinion poll released Wednesday by the Levada Center, Russia's only major independent pollster, showed that 53 percent of Russians would vote for Putin in the next presidential election, a drop from 70 percent compared to January 2018.