NEW YORK — Representative Gregory Meeks was voted by his Democratic colleagues on Thursday to serve as the next chairman of the House Foreign Affairs Committee, beating out the more progressive Joaquin Castro.

Meeks has long described himself as a major supporter of the US-Israel relationship, voting in favor of military aid for the Jewish state and against the BDS movement. He has ties to AIPAC and J Street, with both the establishment group and the dovish lobby calling the New York congressman a friend.

Meeks beat out Castro 148 to 78. He will be the first Black representative to chair the Foreign Affairs Committee, replacing longtime New York Rep. Eliot Engel, who was ousted in a primary by a progressive challenger earlier this year. Engel was also known for his close ties to the pro-Israel establishment in Washington.

In interviews and events leading up to Thursday’s vote, Meeks said that he would work to reinvigorate the State Department, accusing outgoing US President Donald Trump of gutting the agency. He has also backed Biden’s plan to re-enter the Iran nuclear deal.

The election for panel chair became a two-man race on Wednesday after Rep. Brad Sherman announced his withdrawal.

US Rep. Brad Sherman, a solidly pro-Israel Democrat from California, who was the most hawkishly pro-Israel of the trio, made the decision after finishing last in a Tuesday preliminary vote by the House Democratic Steering and Policy Committee. The more moderate Meeks won 29 votes to Castro’s 13 and Sherman’s 10.

All three lawmakers auditioned for the job in meetings with the centrist Democratic Majority for Israel and J Street. They all said that US money should not be used to annex West Bank territory, a move that Israel’s government considered earlier this year.

Meeks suggested that aid to Israel could be used as leverage to influence its policy.

“Annexation is anathema to a two-state solution, and America cannot be used by its proponents to justify a pro-annexation position or policy,” he said. “On the contrary, the United States must be explicit in our opposition by applying pressure against Netanyahu should he annex territory, including leveraging US aid.”

Meeks and Sherman later clarified that they meant that money allocated for defense assistance was, according to US law, off-limits for spending in the West Bank, which is administered by Israel’s Defense Ministry.

Castro did not stand down from his assertion that using the money for annexation could invite reconsideration of some assistance to Israel.

“Congressman Meeks has been a strong supporter of the US-Israel relationship, and we congratulate him on his election. We look forward to working with him on this key panel to further strengthen the alliance between the two democracies,” an AIPAC spokesman told The Times of Israel after Thursday’s vote.

J Street issued a similarly congratulatory statement, saying it looked forward to “work[ing] together with Chairman Meeks to help revitalize the State Department and American diplomacy, to return the United States to compliance with the JCPOA (Iran deal), to promote comprehensive Israeli-Palestinian peace and to oppose the dangers of creeping annexation in the West Bank.”

Meeks was one of two Democratic Party centrists with solid Israel bona fides who defeated a progressive to chair a key House committee on Thursday.

Rep. Rosa DeLauro, a Connecticut Democrat close to the party establishment, defeated Marcy Kaptur of Ohio and will replace New York’s Lowey as chairwoman of the powerful Appropriations Committee. Lowey is retiring this month and, like Engel, has long been close to the pro-Israel community. Both Engel and Lowey are Jewish.

DeLauro is married to Stanley Greenberg, a prominent Democratic pollster who has advised Israel’s Labor Party.

In Republican caucus elections, Kay Granger and Mike McCaul, both of Texas, kept their positions as ranking members of the Appropriations and Foreign Affairs committees, respectively.