CHARLOTTETOWN -- Robert Ghiz is stepping down as premier of Prince Edward Island, saying his time is up in provincial politics but he could still make a career in the federal arena.

Ghiz said Thursday he will remain as premier until a leadership convention in the new year, handing over the party at a time when the Liberals are far ahead in the polls and the opposition parties are struggling.

Political scientist Peter McKenna of the University of Prince Edward Island said he was stunned by Ghiz's decision.

"He's 20 points up in the polls, the Conservatives don't have a leader ... there was a clear track to win in the next election," he said.

"I'm scratching my head. ... It's unusual that a premier who has really hit his stride and is cruising to victory in the next election would step aside."

But Ghiz said it is best to leave while enjoying success.

"You see more politicians stay longer than they probably should. ... Sometimes you just need to say for the sake of the province and the party and yourself, you're better off moving on."

Ghiz said his decision also gives the party enough time to prepare for the next election, which is set for October 2015 but could be moved to a date earlier or later if the federal election is scheduled for the same time.

"There's always time for renewal," said Ghiz, who first became premier at the age of 33 in 2007.

"I'm proud of our record but I'm also proud of the team that's going to be here to continue on."

Ghiz followed his father's footsteps into the premier's office.

Joe Ghiz served as premier from 1986 to 1993. He died at the age of 51 in 1996.

After his father's death, Robert Ghiz spent the early years of his career in Ottawa, working as the Atlantic Canada adviser to former prime minister Jean Chretien.

As a friend of Liberal Leader Justin Trudeau, Ghiz said a return to a federal role is a possibility after he spends more time with his wife and three children, aged five, three and one.

"As of now, I don't have anything specific, but as you know I am a friend of Justin and a fan of Justin and I guess we'll wait and see," he said during a news conference announcing his departure.

In an interview later, Ghiz said he won't make a political comeback in the next federal election.

"If I wait two elections, I'm 49 years old. That's still relatively young in political years. I'm going to keep my options open," he said.

Ghiz, now 40, has been the leader of the P.E.I. Liberals for 12 years. He took the helm of the party when it was mired in debt and had only one elected member in the legislature.

He leaves with the provincial Liberals in solid command of the house, holding 23 of its 27 seats.

McKenna said 18 months ago, Ghiz came to his classroom and on the way out he told the professor he expected to run in one more provincial election.

The premier said he changed his mind recently as he reflected on the benefits of handing over a strong party to a new leader well in advance of the next election.

"I've gone back and forth: Is this what I really want to do? But I look at it. I'm not at the stage of my career when I'm ready to retire. ... I hope to do other things in my life."

Ghiz said his greatest accomplishment while in office has been introducing improvements in education for small children.

"My best day as premier was when we introduced a full-day kindergarten program and ensured a stronger start for an entire generation of young Islanders," he said.

At his news conference, Ghiz said the unemployment rate on the Island has been lower than 10 per cent for the last number of months and the economy is strong.

However, Ghiz's government has faced criticisms as well.

The Liberals have held power during a series of pesticide spills that have caused thousands of dead fish to wash up on riverbanks.

In the last election, a former government employee alleged the province's immigration nominee program had been marred by mismanagement.

Ghiz defended his record, saying the government's immigration programs have helped increase the province's population and he has to balance environmental laws with the reality that agriculture is the top industry in P.E.I.

"I'll be the first to admit I'm not leaving a province that is perfect, but I believe the difference between 2007 and 2014 is significant," he said.