FRAMINGHAM — The family of a Framingham man who was accidentally shot and killed by police in 2011 will receive $3.75 million to settle its lawsuit against the town.

Town officials on Wednesday released the terms of a settlement reached with the estate and family of Eurie Stamps, who was shot in the head by a Framingham police officer while he lay face down on the floor of his apartment during a SWAT team raid.

According to the town, the $3.75 million payment will settle all claims in the suit, which was filed against the town and Officer Paul Duncan in 2012.

The town’s insurance provider, the Massachusetts Interlocal Insurance Association, fought the suit in court for nearly four years, going so far as to challenge a federal judge’s ruling that Duncan may have violated Stamps’ civil rights by switching the safety off his weapon and allegedly pointing his loaded rifle at Stamps’ head.

The town and its insurer argued that Duncan is immune from liability for the death because he was acting in his official capacity as a police officer when he fatally shot Stamps. A panel of federal judges rejected their appeal in February, agreeing that a reasonable jury could find Duncan violated Stamps' Fourth Amendment rights.

The law was sufficiently clear at the time that "pointing a loaded firearm at the head of an innocent and compliant person, with the safety off and a finger on the trigger, is not constitutionally permissible,” they found.

An attorney who represented the Stamps family in the lawsuit could not immediately be reached Wednesday for comment on the settlement.

In an announcement, Framingham selectmen said they recognize the grief and sorrow suffered by Stamps’ widow and children.

“My heart goes out to the Stamps family,” Selectman Cheryl Tully Stoll said. “There is nothing we can do that will make up for the tragic death of Mr. Stamps. I pray that the family will someday be able to move forward and find peace.”

Stamps was killed Jan. 5, 2011, inside his first-floor apartment at 26 Fountain St., where the retired MBTA maintenance worker and grandfather of 12 lived with his wife and stepson.

Police were granted a warrant to search the apartment after receiving a report that the stepson, Joseph Bushfan, and others were selling crack cocaine from the home.

After breaking down the front door and rushing into the apartment, two officers encountered Stamps in a hallway and ordered him to get on the floor. He complied, placing his hands near his head.

While the officers left to continue searching the apartment, Duncan — one of 11 officers involved in the operation — approached, stood over and pointed an M4 rifle at Stamps, ultimately firing a shot that struck Stamps in the head, killing him.

In 2011, the Middlesex District Attorney's Office investigated the shooting and ruled it was accidental, and that no criminal charges were warranted.

In the wake of Stamps' death, the town disbanded its SWAT team. Duncan remains a uniformed patrol officer, and currently serves as the head of the Framingham Police Officers Union.

In an announcement, the town noted that police now participate in Framingham Comes Together, a coalition of community groups organized by local clergy to discuss race relations, and are working to introduce electronic stun guns as alternative to firearms.

The police department is also exploring a pilot program for officers to wear body cameras, according to the announcement.

"The Framingham Police Department has provided additional training to our officers and will continue to do so," Chief Kenneth Ferguson said in the announcement. "Our goal is to provide the highest level of police services to the residents of Framingham and to prevent as much as humanly possible any other family from experiencing the sorrow that the Stamps family has endured.”

Jim Haddadin can be reached at 617-863-7144 or jhaddadin@wickedlocal.com. Follow him on Twitter: @JimHaddadin.