Prince Edward Island's Robert Ghiz is resigning and ruling out a run for federal office, at least in the short term, saying he wants to spend more time with his young family.

At 40, Mr. Ghiz is the longest-serving of the current sitting premiers. His announcement Thursday that he will step down after a leadership convention early next year took colleagues and friends by surprise – but Mr. Ghiz is leaving on his own terms, unlike some of his provincial colleagues.

Alberta's Alison Redford and Newfoundland and Labrador's Kathy Dunderdale resigned under pressure and controversy. Last week, Manitoba Premier Greg Selinger shuffled his cabinet after five senior members resigned, challenging his leadership.

Story continues below advertisement

"You see today, and not that I am criticizing anyone, politicians that perhaps stay a little too long and I wanted to make sure that I left with the party in good enough shape that I thought they would be in a good position to continue on," he said in an interview with The Globe and Mail. He declined to say who he was referring to.

Mr. Ghiz became premier nearly eight years ago and has been PEI's Liberal Leader since 2003.

Last summer, after playing host to the premiers in Charlottetown at their annual summer conference, he decided it was time to step down. "I wanted to see what my personal appetite was and to sit down with my wife and talk about things," he said. "And you know, I thought to myself this is probably the best time for the party's sake and my sake and the province's."

Mr. Ghiz's wife, Kate, is a physician. They have three children, all under age 5.

"I do have a passion for politics, but I also believe that some other experience and spending some time with my kids while they are really young is also a good thing," he said.

There has been much speculation that Mr. Ghiz would run for the federal Liberals. He would be an attractive candidate: Fluently bilingual, he has run a province and recently led a mission to China. In the news conference after his announcement, Mr. Ghiz characterized Justin Trudeau, the federal Liberal Leader, as a "friend" and said he was a "fan" of Mr. Trudeau.

In the interview, however, he said he would not run in next year's federal election.

Story continues below advertisement

"Don't expect to see my name on the ballot in the next federal election," he said. But, he quickly added: "I am not ruling it out in the future. I will be 41 when I am done premier here. I could be off for eight years and still be 49 years old."

Mr. Ghiz's resignation comes a day after his government delivered its Speech from the Throne, opening a new session of the legislature. Just after lunch Thursday, he told his caucus he was leaving; Health Minister Doug Currie says everyone was "very surprised" and there were mixed emotions in the room.

Mr. Ghiz has asked the party president to hold a leadership convention in early 2015, and in a statement to Liberals Thursday, he wrote that "a leadership debate will ensure that our party enjoys the renewal that is needed to ensure continued success with Islanders."

PEI Liberal MP Wayne Easter said with Mr. Ghiz facing a provincial election either in the fall of 2015 or the spring of 2016, he had to make a decision now.

"That's the reality of the world," Mr. Easter said. "You've got to make a decision at some point and to give the party opportunity to find a leader."

Don Desserud, a political science professor at the University of Prince Edward Island, said Mr. Ghiz's successor has "big shoes to fill" as he's a well-liked premier, whose late father, Joe, was equally popular during his tenure from 1986 to 1993.

Story continues below advertisement

"His father's memory is revered," Prof. Desserud said. "It is an island version of the Trudeau story."

As Premier, he says, Mr. Ghiz provided a "steady-as-she-goes leadership," and there was no big issue that defined his time in office.

For his part, Mr. Ghiz says he is most proud of his government's investments in kindergarten and early childhood education. As the leader of the country's smallest province, he was also able to elevate PEI's profile on the national stage. Before becoming premier, he had worked in Ottawa in Jean Chrétien 's PMO and was well-connected on the Hill.

As premier, he and Saskatchewan's Brad Wall tackled national files, such as health care and the aging. Mr. Wall, who has become close friends with Mr. Ghiz, told The Globe that he was "completely" taken by surprise by the announcement. "I'm really going to miss him," he said, adding jokingly that around the provincial table they were "Canada's surf and turf" premiers.

He said Mr. Ghiz was an "ardent defender" of PEI but also of the national interest. Often, he said, premiers can be too parochial at the table, but Mr. Ghiz was not.

What's next for Mr. Ghiz? "We'll see what happens," he said.