Japan’s parliament on Tuesday elected ultraconservative Sanae Takaichi as the country’s first female prime minister, a day after her struggling Liberal Democratic Party (LDP) struck a coalition deal with the rightwing Japan Innovation Party (JIP), expected to push her government further to the right.

Takaichi, 64, replaces Shigeru Ishiba, ending a three-month political vacuum following the LDP’s disastrous election defeat in July. Ishiba, who served only a year as prime minister, resigned earlier in the day along with his Cabinet, clearing the way for her succession.

The LDP’s new alliance with the Osaka-based JIP — also known as Ishin no Kai — secured Takaichi’s premiership, as the opposition remains divided. However, the coalition still lacks a majority in both houses of parliament, forcing her to seek support from smaller opposition groups to pass legislation, a challenge that could threaten her government’s stability.

Political stability is essential right now,” Takaichi said Monday during the coalition signing ceremony with JIP leader and Osaka Governor Hirofumi Yoshimura. “Without stability, we cannot push measures for a strong economy or diplomacy.”

The coalition deal highlights Takaichi’s hawkish and nationalistic stance, a continuation of her mentor Shinzo Abe’s legacy. JIP will refrain from taking ministerial posts initially, Yoshimura said, until the party gains confidence in the partnership.

Later Tuesday, Takaichi is expected to unveil a Cabinet featuring close allies of LDP heavyweight Taro Aso and others who supported her leadership bid.

Facing pressing tasks ahead, Takaichi must deliver a major policy speech this week, hold talks with U.S. President Donald Trump, and prepare stimulus measures by December to ease public frustration over rising prices.

Despite being Japan’s first female leader, Takaichi has shown little urgency toward promoting gender equality. She has long opposed same-sex marriage, separate surnames for married couples, and the inclusion of women in imperial succession.

A staunch conservative, she is also known for her controversial views on Japan’s wartime history and regular visits to Tokyo’s Yasukuni Shrine, seen by China and South Korea as a symbol of Japan’s unrepentant militarism. Recently, however, she appeared to soften her stance by sending a symbolic religious offering instead of visiting the shrine in person.

Takaichi’s premiership comes after the LDP’s split with its longtime coalition partner, the Buddhist-backed Komeito party, which cited the ruling party’s handling of slush fund scandals and Takaichi’s nationalist outlook as reasons for its withdrawal.

Observers say her administration’s success will depend on whether she can balance her conservative agenda with Japan’s growing demand for political and economic stability.