Rep. Katie Porter (D-Calif.) questions Tim Sloan, president and chief executive of Wells Fargo, during a House Financial Services Committee hearing on March 12, 2019. (Andrew Harrer/Bloomberg)

By the time it was Rep. Katie Porter’s turn to ask Tim Sloan a question, the Wells Fargo chief executive had already taken a beating from more than two dozen members of the House Financial Services Committee.

The freshman congresswoman had just five minutes to quiz Sloan on the years of scandal that have plagued the megabank — from mistakenly foreclosing on hundreds of customers to opening millions of sham accounts. Porter zeroed in on Sloan’s repeated promises to fix the bank’s problems, including a pledge in a 2017 financial document sent to shareholders.

With a showman’s sense of the dramatic, Porter bent under her desk and brought up a poster with the blowup of a quote from Wells Fargo’s response to a federal lawsuit that appeared to contradict Sloan’s promises. Why were the bank’s lawyers arguing in court that Sloan’s statements in the 2017 document were examples of “corporate puffery?” she asked.

“I don’t know why our lawyers are arguing that,” Sloan said.

On Porter’s Twitter account, clips of the exchange were quickly retweeted, becoming the kind of gotcha moment for which the congresswoman is becoming known. Porter, who was a law professor at the University of California at Irvine, is among the freshman lawmakers who flipped the House to Democratic control this year after she won in an upscale Orange County district that had been held by Republicans for more than 30 years.

She enters the chamber with powerful backers. Porter took a bankruptcy class taught by a law professor named Elizabeth Warren, now a senator from Massachusetts, that she has said changed her life trajectory. In 2012, Sen. Kamala D. Harris (D-Calif.), then California’s attorney general, picked Porter to oversee the distribution of a $25 billion settlement with big banks for fraudulent foreclosures. The Intercept has called Porter an “enemy of the Wall Street foreclosure machine.”

That track record made her a natural for the Financial Services Committee, which oversees such areas as Wall Street regulations, the Federal Reserve and consumer credit bureaus. The committee has other Democratic stars — its chairwoman, Rep. Maxine Waters of California, and Rep. Alexandria Ocasio-Cortez of New York. Waters and Ocasio-Cortez have 1 million and 3.5 million Twitter followers, respectively, compared with Porter’s 45,000.

Still, banking lobbyists have said Porter presents a special challenge. While others may capture bigger headlines, Porter can take a more analytical approach, said a senior industry official, who spoke on the condition of anonymity to freely discuss a lawmaker. Her approach is “intellectual,” the official said.

Porter said in an interview that she has already met with several industry officials since taking office, including Sloan a week before the hearing. She added that she expects to take on a range of issues, including housing affordability. “I thought about these issues for years” before taking office, she said. “I happen to love financial services.”

And Porter said she understands the angst of the committee’s witnesses. She testified before the Financial Services Committee several times, including in 2007 when she spoke about how older Americans use credit cards. “I literally sat in that chair. It’s tough.”

The day before a hearing, Porter prepares with a 70- to 150-page binder of background information compiled by her staff. “I try to ask a question rather than give a speech,” she said. “The American people want to know: ‘Are these witnesses being truthful and honest?’”

In another viral moment last week, Porter held up a copy of a textbook she had written, “Modern Consumer Law,” and asked Kathy Kraninger, the director of the Consumer Financial Protection Bureau, to define “APR” or annual percentage rate.

Kraninger’s answer didn’t appear to impress Porter, who later said the CFPB director had got the definition wrong. The congresswoman then asked Kraninger, who has extensive experience in homeland security but little in consumer finance, to calculate the APR for a $200 payday loan.

“You may want to write this down,” Porter said as she ran through the loan’s interest rate and fees to be used in the calculation.

“If you would like a calculator, we have one for you,” Porter said as a desk calculator appeared in front of Kraninger, who didn’t touch the device — or the problem.

“This is not a math exercise,” Kraninger said, “This is a policy conversation.”

(As Porter and Kraninger faced off, Del. Michael San Nicolas, a Democrat representing Guam, passed a note to Porter with the right answer — 521 percent.)

Porter pressed Kraninger on the question again before finally relenting. “I take that as . . . a no that you cannot do the calculation.”

Porter later posted a two-minute video on her Twitter account walking viewers through the math problem on a whiteboard. The video has been viewed more than 100,000 times.