When it became clear that Representative Nita M. Lowey, Democrat of New York, would lead the House Appropriations Committee, she received a cherrywood gavel, her name and new title engraved in silver.

It was a gift from Representative Kay Granger, Republican of Texas, a longtime committee colleague.

“It’s a lady’s gavel,” Ms. Granger said this past week, her own engraved red gavel by her side. “Powerful.”

And when Ms. Granger secured her position as ranking member, Ms. Lowey was the first to call to congratulate her.

Because of their committee ranks, both women represent House party leaders on the bipartisan panel of lawmakers negotiating a compromise on border security, and their unlikely partnership — Ms. Lowey, 81, is an ardent liberal, and Ms. Granger, 76, is a fierce conservative — is one reason their colleagues believe they can reach an agreement before government funding again lapses on Friday.

Individually, they have shattered a number of glass ceilings in local politics and on Capitol Hill. Ms. Lowey was the first woman to oversee the campaign arm for House Democrats; Ms. Granger was the first Republican woman elected to represent Texas in the House.

(“I can work things out and I can blow things up,” she told her Republican colleagues in a presentation capped with footage of her blowing up an old bridge in Fort Worth.)

Now together, they have broken another: It is the first time two women have held the highest leadership positions on the Appropriations Committee, one of the most prestigious panels on Capitol Hill.

Ms. Lowey and Ms. Granger will be responsible for leading the negotiations to fund the next fiscal year and reaching a two-year agreement to avoid a reduction in spending levels. And they will continue to guide debate over funding for border security, especially given speculation that a final deal will involve a multiyear compromise.

Their colleagues say it is the ultimate recognition of two lawmakers who have spent years climbing the ranks, often outside the spotlight, honing their ability at the negotiating table and learning how to work together with colleagues across the aisle.

“It’s not just, Oh, look, we’ve put two women in,” said Senator Patrick J. Leahy, Democrat of Vermont and the ranking member on the Senate Appropriations Committee. “No, you’ve put two of the absolute best legislators you could have in Congress on there.”

Both women have cultivated reputations as dogged negotiators, making deals with a graciousness that might belie their tenacity.

Ms. Lowey pioneered legislation that requires food manufacturers to list the top ingredients responsible for allergic reactions as well as anti-drunken-driving initiatives, while Ms. Granger has successfully lobbied for increases in military spending and investment in the F-35 fighter jet, which is built in her district.

“If anyone underestimates their toughness,” said Representative Mario Diaz-Balart, Republican of Florida and a member of the Appropriations Committee, “they do it at their own peril.”

Despite their stark ideological differences, their approach to negotiating — an eye for detail, a good-natured acknowledgment of their detractors — has become cohesive, particularly after years of late-night meetings and hearings.

Representative Tom Cole, Republican of Oklahoma and a longtime appropriator, said that both women work “in the style your mother told you to do.”

“Disagreeing without being disagreeable,” he said. “It’s what the American people tell you they want, but seldom reward.”

The two women have swapped leadership roles over eight years on the subcommittee that deals primarily with funding for the State Department and foreign operations, bonding over trips abroad and grappling each year with how to allocate money.

In an interview, Ms. Granger recalled how Ms. Lowey, as chairwoman, made a point of not treating her “like a piece of furniture” the way ranking members often are — and Ms. Granger reciprocated when she oversaw the panel.

“We are honest with each other,” Ms. Lowey said. “You always know where she stands.”

“When she’s the chair, I will lose the battles,” she added with a grin. “When I’m the chair, I win them.”

Ms. Granger, a former teacher, “can freeze you with a stare,” Mr. Cole said, while Ms. Lowey has been known to “tsk tsk” him in the past for what she considered an excessive smoking habit. Yet they are always collegial, he said. Ms. Lowey, in particular before meetings, is often quick to offer a hug or a friendly pat on the arm to other lawmakers.

“In this institution, you’ve got a lot of acquaintances, but not a lot of friends,” said Representative Rosa DeLauro, Democrat of Connecticut and a close friend of Ms. Lowey’s, who described the relationship between the appropriators as “unbelievably close.”

Both Ms. Lowey and Ms. Granger have had opportunities to move beyond the Appropriations Committee: other panels, the Senate, leadership positions with their parties. But they say they have found their niche in using spending levels to affect policy.

“It was consistent of who I am,” Ms. Lowey said. “The job gives you opportunity.”

“This is what I want to do,” Ms. Granger said, “and I wanted to do it well.”

They frequently swap stories and the occasional complaint, Ms. Granger said, but prefer to spend their time outside Washington with family or cultivating the occasional hobby.

Ms. Granger carefully schedules blocks of time — two hours minimum — to paint, particularly large canvases of abstract art. (Initially unsatisfied with her ability, she takes lessons.)

Ms. Lowey prefers to relax with a pint of ice cream or frozen yogurt. (Her preferred flavors: raspberry, mint chip and pistachio.)

But side by side in both the conference and appropriations panels, they hope that their dynamic will foster an environment where bills get passed — and more women step forward to lead.

“You leave them alone, and they’ll get to a deal faster than leadership,” said Mr. Cole, the Oklahoma appropriator. “There’s nothing they haven’t seen.”