On the House floor, Rep. Elise Stefanik has built the record of a Republican maverick: She’s one of the few GOP lawmakers to vote against the party’s sweeping 2017 tax bill, back equal rights for LGBT Americans and support an effort to grant legal status to young undocumented immigrants.

But inside the ornate Capitol Hill hearing room where lawmakers are gathering evidence for a possible impeachment of President Trump, she has been a complete team player. The New York lawmaker has emerged as one of Trump’s most reliable allies on the House Intelligence Committee, an outspoken critic of panel Chairman Adam B. Schiff (D-Calif.) and one of the GOP’s most effective messengers as it seeks to undermine the Democratic-led probe.

Early in Friday’s hearing with former ambassador to Ukraine Marie Yovanovitch, Stefanik sought to make a point by speaking up during a period of questioning reserved for Rep. Devin Nunes (R-Calif.) and his counsel under rules that passed the House on a party-line vote last month.

“The gentlewoman will suspend,” Schiff said. “You are not recognized.”

“What is the interruption for this time?” she shot back in an exchange calculated to underscore Republican objections to a process controlled by Democrats. “This is the fifth time you have interrupted members of Congress, duly elected members of Congress.”

Her performance Friday caught Trump’s attention: In remarks at the White House before the hearing ended, Trump lamented to reporters that “certain very talented people weren’t even allowed to ask questions,” a reference to Stefanik — though she actually asked numerous questions later in the hearing. Trump also retweeted a video clip posted to Stefanik’s account showing the exchange with Schiff.

In a brief interview after the hearing, Stefanik said she saw no dissonance between her centrist policy views and her prominent role attacking Democrats and defending Trump in the impeachment hearings.

“This is a matter of constitutional importance, and I’m asking substantive, fact-based questions to the witnesses,” she said. “I have one of the top 10 percent most bipartisan records in this House and one of the most independent records. But when it comes to constitutional matters, we should focus on the facts. We should not let this be a partisan attack the way Adam Schiff is conducting himself.”

Some Democrats see something else at work in Stefanik’s newly prominent role on the Intelligence Committee — stage management by a largely male corps of Republican lawmakers. Stefanik is the only GOP woman on the panel and, at 35, the youngest of the 13 Republican women in the House.

“I think everything they did today was strategy,” said Rep. Val Demings (Fla.), one of three Democratic women on the committee. “She’s one of the newer members on the committee, and she’s a woman. . . . When they are badgering a female witness who is a career Foreign Service officer with an impeccable record, and they want to badger her, I think it’s a better look when a woman is taking the lead on that.”

Stefanik has not shied away from her party’s fraught record on gender, delivering stern warnings to the men running her party that the GOP needs to do a better job recruiting female candidates and appealing to female voters. To that end, she has raised more than $340,000 this year for her political action committee devoted to electing women — an effort that has the backing of House Minority Leader Kevin McCarthy (Calif.) and other top party officials.

She bristled at the suggestion that her role in this week’s hearings had anything to do with gender: “They’re putting me forward because I ask the best questions,” Stefanik said, calling any suggestion otherwise “shameful.”

Inside a closed Oct. 29 deposition, Stefanik sparred with the lawyer of Lt. Col. Alexander Vindman, the National Security Council director overseeing Ukraine, over what she later called a “sexist remark.”

“I don’t know who you are, if you could identify yourself for the record,” said the lawyer, Michael Volkov, when Stefanik asked a question.

“I’m on the House Intelligence Committee,” she replied, adding, “I get asked this a lot.”

“Oh, that’s good,” Volkov said.

Stefanik shot back, “No, it’s not good. But I will continue my line of questioning.”

According to transcripts released by the Intelligence Committee, Stefanik attended at least part of seven of the 11 depositions for which the panel has issued transcripts. Stefanik asked questions in two of those seven depositions.

That is an above-average attendance rate among the members of the three committees authorized to participate, but Stefanik is not among the handful of Republicans who have attended every session and asked frequent questions.

Early in Wednesday’s hearing with two State Department officials, Stefanik interrupted Schiff to ask whether Democrats would be “prohibiting witnesses from answering members’ questions as you have in the closed-door depositions.”

Schiff shot back, “As the gentlewoman should know, if she was present for the depositions — ”

“Which I was,” she interjected.

“For some of them,” Schiff said.

Stefanik has otherwise used her time in both public hearings to deliver key GOP messages: that Trump’s policy of delivering aid for lethal weapons was better for Ukraine than former president Barack Obama’s; that Trump was justified in seeking investigations of Ukrainian corruption; and that Ukraine ultimately got military aid.

“For the millions of Americans viewing today, the two most important facts are the following: Number one, Ukraine received the aid. Number two, there was, in fact, no investigation into Biden,” she said Wednesday.

Stefanik represents New York’s North Country, stretching from the outskirts of Saratoga Springs across the Adirondack Mountains to the Canadian border — territory that has long been considered politically moderate but took a sharp turn to the right in 2016, voting for Trump by 14 points.

Stefanik’s own 14-point victory over Democrat Tedra Cobb last year was her closest race since winning election to a vacant seat in 2014. Cobb is again running to unseat Stefanik and has seized on the impeachment proceedings to paint her as a partisan.

“Instead of upholding her constitutional duty, Elise Stefanik continues to choose the advancement of her political career at the expense of our national security,” Cobb tweeted Wednesday.

On Friday, Cobb suggested Stefanik’s high-profile role had been a boon for her campaign fundraising: “I am overwhelmed by the support we’re seeing today.” And in a tweet Saturday, the Cobb campaign said it had raised more than $300,000 since Stefanik’s “political theater on national television.”

Among the contributors to the Democrat was George Conway, husband of White House senior adviser Kellyanne Conway and a fierce Trump critic, who contributed the maximum of $2,800 and urged others to do the same.

“If you believe in truth in politics and in the rule of law, you should give what you can as well,” Conway said on Twitter.

As she was emerging as a GOP star of Friday’s impeachment hearing, Stefanik was also burnishing her bipartisan bona fides. Voting during a recess in the hearing, Stefanik was one of only 13 Republicans who joined with 222 Democrats to reauthorize the U.S. Export-Import Bank — a long-standing target of House conservatives.

She also remains a favorite daughter of the GOP’s establishment wing, a group that has long managed to swallow its discomfort with Trump. Stefanik was named this month to Time magazine’s list of the 100 most influential up-and-coming global leaders. In a short essay for the list, former House speaker Paul D. Ryan (R-Wis.) called Stefanik “the future of hopeful, aspirational politics in America.”

“Elise Stefanik is a builder — no easy feat in an age when so much of politics is about tearing people down,” Ryan wrote.

Still, on social media this week, Stefanik has become a partisan flash point, with GOP voices decrying Schiff’s decision to silence her questioning — never mind that Stefanik later received time for questions that she did not fully use.

One tweet, from the Daily Caller, compared the performance to Senate Majority Leader Mitch McConnell’s 2017 move to silence Sen. Elizabeth Warren (D-Mass.) — an exchange that went viral among Democrats.

“She was warned. She was given an explanation. Nevertheless, she persisted,” the conservative news outlet tweeted, using McConnell’s words, with a photo of Stefanik.

Meanwhile, other voices have treated her as an ideological turncoat. Nicolle Wallace, an MSNBC host who served as a senior communications aide to President George W. Bush and for Sen. John McCain’s 2008 presidential campaign, suggested in a tweet that Stefanik was drinking “loony tune juice with her breakfast” with former South Carolina governor Nikki Haley, “going from occasionally reasonable republicans to Trump shills.”

Another former Bush aide, Matthew Dowd, called Stefanik “a perfect example of why just electing someone because they are a woman or a millennial doesn’t necessarily get you the leaders we need.” Dowd later deleted the tweet and apologized to Stefanik.

“This is one of the reasons young women don’t run for office,” she said in response, accepting the apology.