For nearly four years, Javier Burgos was the main suspect in the June 2013 shooting deaths of two janitors at Alexander W. Dreyfoos School of the Arts.

On Thursday morning, after Federal Bureau of Investigation officials brought him back from Colombia, Burgos confirmed detectives’ suspicions — he was the one who shot to death his coworkers, Ted Orama, 56, and Christopher Marshall, 48.

From the beginning: Dreyfoos school janitor murders

Though West Palm Beach Police Chief Sarah Mooney would not go into detail about why Burgos came forward now, she said that after several years of investigating, everyone involved was glad finally to have an arrest. Burgos was booked Thursday into the Palm Beach County Jail and is expected to have a bond hearing Friday morning.

"Things just fell into place perfectly (Wednesday) to get him back here and get a confession," she said at an afternoon news conference.

Mooney said several agencies, both federal and local, helped over the years to come to this day and hopes it brings some closure for the family.

"They’ve waited a number of years for a resolution to this case, and our goal from the get-go was to give you justice," she said.

L.J. Ugarte, Marshall’s brother-in-law, said he and Marshall’s children are thankful for all of the police department’s efforts.

"We thought you guys had given up on us, but we knew you guys worked tirelessly. Thank you so much," Ugarte said.

See who’s been booked into the Palm Beach County Jail

Marshall and Orama were found shot to death in a maintenance area of the school, just west of CityPlace, by another custodian at about 6:30 a.m. June 19, 2013.

Burgos was became a person of interest in the killings soon after their deaths. Police suspected the Colombian native had fled the United States after his car was found in El Paso, Texas, several months after the shooting.

In 2014, Burgos was suspected in the shooting. A warrant for his arrest was issued in August 2016, according to the police chief. Mooney did not give any details on how the arrest warrant came about. Police said they knew Burgos was in a rural area of Colombia.

On Wednesday, Burgos went to the U.S. Embassy in Colombia and requested the embassy’s guidance to return to the United States to face two first-degree murder charges in the janitors’ deaths, according to Mooney. FBI agents flew with Burgos to Miami, where U.S. Marshals detained him. Police detectives interviewed Burgos on Thursday morning, and he confessed to the killings.

During the news conference, Palm Beach County School District Police Chief Lawrence Leon said that along with the arrest bringing some closure to the families of Orama and Marshall, it also brings closure to those at Dreyfoos.

"It was a family, for the students and staff there as well," he said.

Mayor Jeri Muoio said she was speaking with a school board member Thursday morning when the news was breaking, and the member was so surprised, telling the mayor that some school employees were worried for the last few years the gunman would come back for them.

"For years, worrying that this person would come back and hurt us," Muoio said. "So I think this is going to be a relief for so many people in so many ways."

Alphonso Mayfield, the president of the Florida Public Services Union, told The Post the arrest should bring answers to questions he and the union members have. Marshall and Orama were both members.

"I have a lot of questions about exactly what happened and how they found him," Mayfield said. "There’s a sense of relief. I’m happy the family is going to get closure. Hopefully, justice will happen."

Since the fatal shooting, the union and the school district have made changes to policies. It once was common for a custodian to work alone; now they work in pairs. There also is a zero-tolerance policy regarding weapons. A custodian lost his job because he brought a gun to school and kept it in his car, Mayfield said.

Also, there is now a quality public service council comprised of representatives from the school and union.

The former Dreyfoos janitor had a well-documented history of odd and violent behavior.

Burgos was accused of trying to sell a gun to a fellow custodian on school grounds, as well as grabbing his crotch in front of a female co-worker and challenging another a co-worker to a fight, records show. Burgos was the subject of several complaints to school police and officials during his years at the school.

In August 2010, Orama and Dreyfoos administrators, including Principal Ellen Van Arsdale and Assistant Principal George Miller, met with Burgos to discuss his behavior and attendance.

Van Arsdale told him that there are to be no guns on campus. She also said touching or scratching himself while in the presence of others falls into the category of sexual harassment. The principal encouraged Burgos to speak up about any problems, and to seek help through an employee- assistance program. However, it is unclear if he ever did.

The meeting notes show Burgos was interested in transferring schools to one closer to his home, and he was encouraged to do so.

"I think it is in every one’s best interest if you seek a position elsewhere," Arsdale said, according to documents.

Monty LaParche, the central area custodial coordinator, told Burgos the custodians felt threatened by him and uncomfortable with his behaviors. He said at the meeting that Burgos that he had an anger-management problem and that he didn’t want Burgos’ behavior directed at students.

"Javier, we know you have guns and a history of inappropriate behavior," he said. "The custodians feel threatened."

Burgos blamed his coworkers and said they provoke him.

"I’m not a troublemaker. I’m not a problem. They provoke me. They know I get angry," he said.