WASHINGTON — In his final acts of clemency on Monday, President Bush commuted the sentences of two former U.S. Border Patrol agents whose convictions in 2006 for shooting a Mexican drug dealer sparked a passionate debate over the rights of illegal immigrants.

The prosecutions of Jose Alonso Compean and Ignacio Ramos became a cause celebre for many conservatives, who argued that the pair were just doing their jobs in trying to apprehend a dangerous illegal immigrant. The victim, Osvaldo Aldrete Davila, admitted smuggling several hundred pounds of marijuana on the day he was shot.

The Justice Department strongly defended the prosecution, noting that Davila was unarmed and shot in the buttocks while fleeing and that the two agents tried to cover up their actions with a false report of the incident. Their sentences were upheld last year by a federal appeals court.

Administration officials said Bush believed the verdicts in the case were just, but thought that the sentences were excessive. Compean had been sentenced to 12 years in prison, and Ramos 11 years. The commutation means the pair will walk out of federal prison March 20 after serving 26 months each, officials said.

"We wouldn't give up. … I knew sooner or later God would come through — that finally it would happen," said Joe Loya, Ramos' father-in law, who has received tens of thousands of supportive e-mails and spent much of the past two years traveling the country to speak about the case.

The commutations amounted to the only significant public move by Bush since he gave a brief farewell address to the nation Thursday night. After a weekend at Camp David and a private dinner Sunday night, Bush spent Monday morning saying goodbye by phone to more than a dozen prominent world leaders, the White House said.

Bush will come back into the public eye this morning to welcome President-elect Obama to the White House before his noon inauguration. After that, Bush will depart for a welcome-home rally in Midland, Texas, followed by a night at the family ranch in Crawford as a private citizen.

A president has the unfettered power to shorten, or commute, a sentence or to forgive a crime entirely through a pardon. Bush has exercised his clemency power sparingly, granting 189 pardons and 11 commutations.