When Pat Toomey won reelection to the Senate in 2016, he did it using the traditional Republican formula for success in Pennsylvania: win big in the state’s conservative areas, and keep it close in the suburbs by appealing to moderates. It was tight, but it worked.

But that same year, then-candidate Donald Trump tore up that playbook and went a different way. His combative approach got him crushed in the suburbs but drew out so many rural and small-city voters that he won anyway. Barely.

Now, with Toomey planning to leave politics after 2022, wide-open GOP primaries for governor and Senate that year could provide the first post-2020 test of which path Pennsylvania Republicans choose for their future. Will they opt for someone who echoes the sharp-edged Trump style? Or return to a figure like Toomey who, while deeply conservative on policy, offered a businessman’s mild-mannered persona and more traditional style of Republican politics?

Toomey announced Monday that he won’t run for either reelection or governor. His decision opened the door for a wide range of candidates, turning the 2022 primaries into a potential pivot point for a party that has been dominated by Trump — and will continue to be if he can mount a comeback to win reelection.

Toomey would have been the obvious favorite in either the 2022 Senate or governor’s race if he had run (and most political insiders expected him to campaign for governor). But in his place, a slew of Republican figures are expected to pile into both contests.

Both 2022 primaries now lack obvious Republican front-runners. So the jockeying has already begun, even with this year’s election still in the balance.

“There are so many potential candidates exploring a run for statewide office that the governor would need to ease COVID restrictions to fit them all on a debate stage,” said Matt Beynon, a GOP strategist who works on Pennsylvania campaigns.

Among those already being mentioned as potential Republican candidates for either race: U.S. Rep. Dan Meuser, who is said to have enough personal wealth to help fund his own campaign, fellow U.S. Reps. Guy Reschenthaler, Glenn Thompson, and Lloyd Smucker, former gubernatorial candidate Paul Mango, who is also independently wealthy, and State Sen. Camera Bartolotta.

Former U.S. Rep. Ryan Costello, of Chester County, has expressed interest in a Senate bid, though many in the party remain bitter over his relatively late decision to drop his 2018 reelection campaign.

Jeff Bartos, a Lower Merion real estate developer who briefly ran for Senate in 2018 before switching to an unsuccessful bid for lieutenant governor, is said to be considering another Senate run. In a statement, Bartos said he was focused on running a nonprofit he started this year that provides loans to small businesses affected by the coronavirus pandemic.

“We are going to be having discussions as a family in the days and weeks ahead, and look forward to having more to say after the election,” Bartos said.

Some eyes are also on Republican William M. McSwain, the U.S. attorney in Philadelphia, who has forcefully echoed Trump’s “law and order” message.

The Democratic races could also be crowded, though Toomey’s decision has not scrambled the calculus there as much. State Attorney General Josh Shapiro is still seen as the most likely Democratic nominee for governor, though he could yet face an opponent from the left.

The Senate race, meanwhile, is expected to draw a far larger crowd, given Shapiro’s perceived strength in the gubernatorial contest. Shapiro, of course, like many other people now considering their futures, is first up for reelection this year and has to win that race before turning to other offices.

Much could hinge on the outcome of the 2020 campaign. If Joe Biden is elected president, history suggests 2022 would lead to a midterm election cycle that favors Republicans. If Trump is in the sixth year of his presidency, however, the typical push against the party in the White House would favor Democrats.

There’s also significant speculation about campaigns by Lt. Gov. John Fetterman, who ran for Senate in 2016 but lost in the Democratic primary, U.S. Reps. Conor Lamb and Chrissy Houlahan, and state Treasurer Joe Torsella. Many Democrats expect Fetterman, the former mayor of Braddock, outside of Pittsburgh, to make another run for Senate. But he has not ruled out the possibility that he might run for governor.

“2022 is wide open,” Fetterman said in an interview Monday. “I see two open lanes for 2022, but also the most consequential election of our lifetimes right in front of us in less than a month.”

Houlahan is focused on her reelection campaign and supporting other Democrats in November, but “certainly isn’t ruling out the possibility of running for Toomey’s seat,” a person close to the congresswoman said Monday.

She and Lamb both flipped competitive congressional districts in 2018.

A source familiar with Torsella’s thinking said the Montgomery County Democrat is leaning toward running for governor in 2022 but hasn’t ruled out a Senate bid. Torsella ran briefly for the Senate in 2010 and had been expected to try again, but over the course of the last year started looking instead at the race for governor.

The source said Torsella, who is also on the Nov. 3 ballot for reelection, “is interested in having the biggest and most useful impact” for the state, which pushed him toward the governor’s office.

People close to potential candidates or familiar with their plans spoke on the condition of anonymity because they weren’t authorized to discuss the plans publicly.

A source close to U.S. Rep. Brendan Boyle (D., Phila.) said he is eyeing a run to replace Toomey in the Senate. “Running for that seat is something he is looking at, something he’s going to strongly consider, but he wants to wait until after the election cycle,” said the source, who has spoken directly with Boyle about his plans.

Montgomery County Commissioner Valerie Arkoosh, a physician who helped guide the first Pennsylvania county to have a significant coronavirus outbreak, said that, after working to defeat Trump, she will turn her attention to “very seriously exploring” a run for U.S. Senate in 2022.

“As I have led Montgomery County through this pandemic, I have seen firsthand that, at the federal level, a lot more could be done to prepare for emergencies such as a pandemic,” Arkoosh said in an interview. Arkoosh said she was also interested in working in the Senate to improve health equity and fight for living-wage jobs.

Another Democrat who may be in the mix for a Senate run is State Rep. Malcolm Kenyatta (D., Phila.), who has raised his profile in recent weeks with viral moments in Harrisburg, appearances on MSNBC, a brief speaking role at the Democratic National Convention, and visits to his House colleagues’ districts across the state. A progressive first-term lawmaker, Kenyatta could run to the left of many of the other potential candidates in a Democratic primary.

In an interview, Kenyatta said he’s focused on ensuring Biden wins Pennsylvania and helping Democrats take back the state House, but has had allies encourage him to run for Toomey’s seat. “Working people deserve a champion,” Kenyatta said, “and Pat Toomey was definitely not it.”

Staff writer William Bender contributed to this article.