A federal judge has thrown out a civil rights lawsuit filed by the family of a man who was fatally shot by New Orleans police three years ago after a traffic stop in Mid-City.

The lawsuit claimed that former New Orleans police officer Jason Giroir used excessive force against Justin Sipp and racially profiled him when he pulled him over near the corner of North Bernadotte and Toulouse streets.

U.S. District Judge Ginger Berrigan dismissed the claims, ruling that Giroir acted reasonably and in response to Sipp, who resisted arrest and fired 14 rounds at officers trying to take him into custody. Two other police officers, called to assist Giroir, were wounded in an exchange of gunfire.

“Justin Sipp had given Giroir a false identity during the traffic stop and was actively resisting the officers’ instructions to step out of the vehicle,” Berrigan wrote in a 16-page ruling. Sipp, the judge noted, had knocked Giroir to the ground and opened fire on three officers.

The traffic stop happened before dawn on March 1, 2012. Sipp was headed to work at a Burger King and caught a ride with his brother, Earl Sipp III.

The Sipps’ father has claimed police had no probable cause for the traffic stop; New Orleans police said the Sipps’ vehicle had a broken license plate light.

Giroir, working a private shift for the Mid-City Security District, spotted the Sipps’ vehicle as it headed north on Canal Street and began to tail it in his marked police car. Once the vehicle stopped at North Bernadotte Street, Giroir turned on his emergency lights and approached the vehicle, asking Earl Sipp III for his license and registration.

Earl Sipp’s license had been suspended, according to court documents, and he had an outstanding traffic warrant. Justin Sipp, who claimed to have no identification, also had an active warrant.

As Giroir sought to handcuff Justin Sipp, the man resisted, knocking Giroir to the ground. Rapid gunfire erupted in which two officers were shot. Earl Sipp was shot in the leg, while Justin Sipp was fatally shot.

Ballistics testing did not determine whose rounds struck the Sipps but revealed that Justin Sipp fired 14 rounds, while Giroir fired one .40-caliber round. One of the injured officers, Anthony Mayfield Jr., fired six rounds.

Giroir’s attorney, Eric Hessler, portrayed Berrigan’s ruling as a vindication of his client, who later resigned from the NOPD after making controversial comments in the wake of the fatal shooting of Trayvon Martin in Florida.

“There was never any question who the aggressors were,” Hessler said. “The judge recognized that the officer was working in the course and scope of his employment and his actions were certainly reasonable, necessary and legal.”

Giroir resigned after posting an inflammatory comment — “Act like a Thug Die like one!” — under an online news story about Martin’s shooting death, which provoked a national outcry over perceived racial profiling.

Sipp’s family, in their lawsuit, sought to show that Giroir had a history of racially biased use of excessive force, pointing to a prior civil case the city settled involving a black woman who accused Giroir of assaulting her and using pepper spray on her during a traffic stop.

Berrigan said that settlement “does not constitute proof that Giroir admitted to any culpability.”

Follow Jim Mustian on Twitter, @JimMustian.