BANGOR, Maine — A 10-year-old computer system controlling the airfield lighting at Bangor International Airport is being upgraded with an emergency $34,540 purchase of three new computers, officials said Thursday.

The City Council Finance Committee retroactively approved the purchase during a meeting on Monday. The computers should arrive within two weeks, said Robbie Beaton, director of airport operations.

In a memo to councilors, Airport Director Tony Caruso described the old system as unstable and likely vulnerable to cyberattack. City Information Technology workers recommended the immediate changeout, Caruso said.

“The previous system, and the backup system, were Windows XP systems that are ‘end of life’ for support from Microsoft and are a security risk for viruses and malware attacks,” he wrote. “This is a critical component of our overall airfield lighting system. If it is out of service, we would have to close the runway until a new system is in operation or we take more drastic measures, which will require us to have personnel to ‘man’ and operate the system 24/7.”

Airport workers first became aware of the system’s instability when a computer monitor in the airport’s tower began to dim, Beaton said. He didn’t recall the precise date and Caruso’s memo only described the incident as having occurred during the week of Jan. 23.

“We knew the system was very unstable at that point and could possibly go out of service at any moment,” Caruso said Thursday.

The computer system consists of three computers located in the tower, lighting vault and airport maintenance building. The system controls more than 1,000 airfield lights, including the blue taxiway LED lights, white runway in-pavement incandescents, amber runway-edge lights and 85 airfield signs, Beaton said.

The lights turn on and off or dim depending on flight arrivals, time of day, weather and other factors. For example, pilots of a landing flight will see the amber lights alternating white to red, then all red as their airplane continues down a runway. This warns them that they are approaching the end of the runway, Beaton said.

Also, to save energy costs, airport workers will sometimes shut off or dim some runway lights during slow times when no flights are coming in or leaving, Beaton said, or brighten them during bad weather.

“We might have a lightning strike that sometimes will take out a bank of lights, but we have never lost all of our lights in the time that I have been here,” said Beaton, who has worked at BIA for seven years.

The committee approved the emergency purchase without much discussion. The full council is expected to ratify the decision when it meets Monday at 7:30 p.m.

The computer purchase gives Bangor International a jump on the Federal Aviation Administration-required upgrading of the field lighting and other illumination systems expected at the end of the decade, Beaton said. That full upgrade could cost about $500,000, he said.

The airport’s carriers include Allegiant Airlines, American, Delta and United. The facility served a record 492,671 passengers in 2016. United, American and Delta provide daily, nonstop service to Detroit, New York City, Philadelphia, and Washington, D.C. Allegiant provides several weekly flights to Sanford/Orlando and Tampa/St. Petersburg, according to the airport’s website.