The Dominican Republic's environment minister - who was also the son of a former president - was fatally shot in his office by a close friend on Monday, the office of the president said in a statement.
Authorities said Orlando Jorge Mera was shot by Fausto Miguel de Jesus Cruz de la Mota, who was later arrested at a church dozens of blocks away after telling a priest he had committed a crime and handed over a gun to him.
Officials gave no motive for the shooting and it was not immediately clear if Mr Cruz, 56, had an attorney.
"We express our deepest condolences," the office of president Luis Abinader said.
As shots rang out late on Monday morning, people on the street yelled and took cover as those fleeing the building climbed over a tall fence after first throwing over purses, backpacks and even a pair of shoes because the building's main gates were locked.
Authorities said that in a phone conversation with Mr Cruz while he was at the church, he promised to turn himself in if they guaranteed he would not be killed.
Heavily armed police officers took him into custody at the church, which is about a 15-minute drive from the office where Mr Jorge Mera was shot.
When he was brought out, Mr Cruz was wearing a helmet and bulletproof vest and kept his head mostly down as the glasses he wore slid slightly down his nose. One bystander yelled: "You killed a good man! Murderer!"
The victim came from a powerful political family. He was the son of former Dominican president Salvador Jorge Blanco and his sister is a vice minister in Mr Abinader's administration.
The family issued a statement saying that Mr Cruz had been Mr Jorge Mera's friend since childhood and that the victim was shot multiple times.
"Our family forgives the person who did this. One of Orlando's greatest legacies was to not hold grudges," it said.
Police and emergency officials swarmed the office of the environment and natural resources ministry in the capital Santo Domingo and barred entry as mourners gathered nearby. Mr Jorge Mera's office was on the fourth floor of a building that also houses the ministry of tourism.
"We are troubled by the situation," the environment ministry said in a brief statement.
Bartolome Pujals, executive director of the government's cabinet of innovation, wrote that he lamented the killing.
"His death is a tragedy," Mr Pujals said. "We Dominicans have to come together to achieve a pact for peace and peaceful coexistence. No more violence."
Mr Jorge Mera, a lawyer, was appointed minister of environment and natural resources in August 2020.