The Supreme Court on Tuesday unanimously rejected claims from protesters who said Secret Service agents violated their free speech rights during then-President George W. Bush’s 2004 reelection campaign.

The anti-Bush protesters had been moved away from the president on the campaign trail, while a group of supporters were allowed to remain in their location. The protesters sought to sue the Secret Service agents.

The court, though, ruled that the Secret Service officials were entitled to qualified immunity in the case, finding that the protesters were not moved solely because they disagreed with the president. 

"No decision of which we are aware, however, would alert Secret Service agents engaged in crowd control that they bear a First Amendment obligation 'to ensure that groups with different viewpoints are at comparable locations at all times,'" Justice Ruth Bader Ginsburg wrote for the court.

Ginsburg said a map of the area showed the protesters opposing Bush were moved because they were in weapons reach of the president, while the supporters position did not pose a similar threat. 

"The map corroborates that, because of their location, the protesters posed a potential security risk to the President, while the supporters, because of their location, did not," she wrote in the unanimous opinion. 

The incident, which dated back 10 years, took place in Oregon in 2004 as Bush campaigned for a second term.

A group of protesters and another group of the president’s supporters had been set up on opposite ends of a street. When Bush made an unplanned trip to eat at an outdoor patio, the protesters were moved farther away and out of weapons reach of the president. 

The protesters claimed they were moved outside of reach solely because they were critical of the president.  

The ruling overturns a Ninth Circuit Court of Appeals decision that found the officers were not entitled to immunity because there was a lack of security rationale for moving the protesters.

Officers are usually granted qualified immunity to protect the president, unless they clearly violate a constitutional protection.

The Supreme Court in the past has cited the importance of protecting the president and allowing for accommodations of reasonable error in some cases.