WASHINGTON — Newly-empowered congressional Republicans challenged President Obama at both ends of the Capitol on Tuesday, voting in the House to repeal the health care program he signed into law but faltering in an initial Senate attempt to roll back immigration policies he issued on his own.

There was a third challenge as well, as Republican leaders announced the House would give final approval next week on legislation clearing the way for construction of the Keystone XL Pipeline. That would trigger Obama’s threatened veto, the first in a new era of divided government.

The skirmishes all seemed likely to end in eventual defeat for Republicans, but served as a potent reminder of their power after Obama challenged them bluntly last month with his State of the Union address and a no-balance budget on Monday calling for higher taxes and new spending. The GOP won control of the Senate in last fall’s elections, and has its largest House majority in nearly 70 years.

Democrats were defiant.

“They’re baying at the moon, something that is not going to work,” said the party’s leader in the House, Rep. Nancy Pelosi, referring to Republicans as the health care vote neared.

The vote was 239-186 to repeal the health care law known as Obamacare.

Both of Maine’s representatives, Chellie Pingree, a Democrat, and Bruce Poliquin, a Republican, voted against repeal. Similar votes have been held more than 50 times in the four years Republicans have held the House, but the day gave newcomers to Congress their first opportunity to vote to uproot the health care law they campaigned against last fall.

“Today, I am making good on my commitment to support a full repeal of Obamacare,” said Rep. Alex Mooney, a West Virginia Republican who took his seat in Congress last month.

The day’s vote was marked by a second difference. The bill included instructions to key committees to begin work on a replacement that the party promised in the 2010 political campaign. Officials described that as a measure of preparation in case the Supreme Court overturns a key portion of the existing program in a ruling expected this June.

Across the Capitol, Democrats blocked debate on legislation to fund the Department of Homeland Security and simultaneously overturn presidential executive orders that have spared an estimated four million immigrants in the country illegally from the threat of deportation. The vote was 51-48, nine shy of the 60 needed to begin work on the measure.

Senate Democratic Leader Harry Reid said his rank and file would continue to block action on the measure until Republicans agree to strip out the immigration provisions.

Echoed by other Democrats, he said Republicans were “playing politics with national security,” citing the execution-by-burning earlier in the day of a Jordanian pilot held hostage by Islamic terrorists in the Middle East as evidence of a threat.

Senate Majority Leader Mitch McConnell of Kentucky said that by issuing his immigration policy by executive order, Obama had committed a “power grab” that exceeded his authority as president.