BOSTON — Nearly two dozen police officers from six Massachusetts departments were honored Thursday with bravery awards given each year in memory of a state trooper who was fatally shot during a 1983 traffic stop.

Gov. Charlie Baker helped present the George L. Hanna Awards during a Statehouse ceremony. It followed by one day a tribute to law enforcement officers killed in the line of duty, with both events coming amid a backdrop of racial tensions nationally over the use of deadly force by police.

The highest bravery award, the Medal of Honor, went to Bourne Police Officer Jared MacDonald, who was shot and wounded in February 2015 while responding to a car fire and reported shooting at a large apartment complex.

Two Bourne officers who helped carry MacDonald and another wounded person through waist-deep snow to ambulances, along with a Bourne officer and state trooper who apprehend a suspect, were presented with the Medal of Valor.

The Medal of Honor was also given to Boston Police officer John Moynihan and three other law enforcement officers in connection with a March 2015 confrontation. Moynihan was shot in the face in March 2015 after he stopped a vehicle and asked a suspect to get out of the car. He survived while the suspect was killed after exchanging gunfire with other officers.

Other awards went to officers from Boston, Chelsea, Tewksbury and Webster.

During his monthly “Ask the Governor” segment on WGBH-FM on Thursday, Baker said incidents including the recent fatal shootings of black men in Charlotte, North Carolina, and Tulsa, Oklahoma, raise “enormously difficult issues.”

The Republican governor credited Boston police for efforts to build trust within neighborhoods and Commissioner William Evans for starting a police body-camera program, though it met with resistance from the police union.

“I think we on the public side need to be as respectful as we must be,” said Baker. “But the public needs to understand that the men and women who sign up for this job in law enforcement face some profoundly difficult circumstances and situations, and people need to be respectful of that.”

Michael Krol, one of five Dallas police officers killed by a sniper during a protest in July, was among those honored at Wednesday’s law enforcement memorial. Krol attended high school in East Longmeadow, Massachusetts.