Former U.S. Rep. Ryan Costello, a Chester County Republican, is taking steps toward running for Pennsylvania’s open U.S. Senate seat next year.

Costello, 44, of West Chester, served in the House from 2015 to 2019. He decided not to seek reelection in 2018 after the Pennsylvania Supreme Court declared the state’s congressional map an unconstitutional partisan gerrymander and imposed a new map with districts that were less favorable to Costello and other Republicans, especially in the Philadelphia suburbs.

His decision to drop out of the race upset many Republicans who believed he was their best chance of keeping the seat.

But Costello is positioning himself as an anti-Trump Republican who could be an antidote to the GOP’s struggles in the suburbs. When a spokesperson for the Republican National Committee attacked GOP lawmakers for abandoning President Donald Trump after this week’s insurrection at the Capitol, Costello responded on Twitter: “If I run I will literally take this entire bulls— head on. And if I would lose I would do so with 100% pride in the fact I did it for a cause greater than myself.”

While in Congress, Costello had positioned himself as a relative moderate, joining the Tuesday Group led by center-right Republicans.

He is expected to form an exploratory committee to run for Senate soon, which would allow him to begin raising money for a campaign. A candidate will likely need to raise at least tens of millions of dollars to win. The most expensive Senate races in 2020 neared or topped $200 million in total spending each, according to the Center for Responsive Politics.

The Washington political newsletter Punchbowl News first reported Costello’s plans Friday.

U.S. Sen. Pat Toomey (R., Pa.) announced in the fall that he would not seek reelection in 2022, setting up a competitive race for an open seat. The race is already considered one of the most competitive in the country and will help determine which party controls the chamber after the midterm elections.

Lt. Gov. John Fetterman, an Allegheny County Democrat, told The Inquirer on Thursday that he is taking a serious look at a run for Senate. He ran unsuccessfully in 2016. “Pennsylvania will be the most important Senate race in 2022,” Fetterman wrote in an a fund-raising email to supporters Friday. “I’m confident we can win if we go for it.”

Costello wrote on Twitter that if he were the GOP nominee, he’d “smoke” Fetterman in the suburbs.

Republicans have been routed in Philadelphia’s populous suburbs ever since Trump’s election, much the consternation of some in the party. Costello has been a sharp Trump critic since leaving office (and at times while in office), which might help his appeal to moderate voters in those areas. But he could also face a fierce backlash with the fervent Trump supporters who make up a significant piece of the Republican electorate and from the state’s GOP establishment, many of whom were furious that he dropped out late in the 2018 election cycle.

After retiring from Congress, Costello started a lobbying firm, which reported $340,000 in receipts last year, according to data compiled by the Center for Responsive Politics. His clients included Calpine Corp., which describes itself as “America’s largest generator of electricity from natural gas and geothermal resources,” and Americans for Carbon Dividends, an advocacy group that supports a carbon tax to fight climate change.

Costello was succeeded in Congress by Chrissy Houlahan, who became the first Democrat to represent Chester County in the House since the 1850s. Houlahan, who was reelected to a second term last year representing Pennsylvania’s 6th District, has said she is also considering running for Senate.

Before serving in the House, Costello was chair of the Chester County Board of Commissioners.