Allegiant Air officials hoping to avoid a repeat of their self-described "bad summer" of 2015 are now welcoming June with two emergency landings of the same aircraft in less than 24 hours.

In both incidents at St. Pete-Clearwater International Airport, pilots declared an emergency because of problems with the aircraft's hydraulic system.

The Airbus 320 — tail number 228NV — first ran into trouble Wednesday not long before its scheduled arrival at the airport from Moline, Ill. A leak in a hydraulic line caused the pilot to declare an emergency, and the plane landed safely at 12:19 p.m.

Mechanics replaced the line, tested it and found that it was airworthy, according to Allegiant.

On Thursday, the same Airbus departed the Pinellas airport as Flight 844 bound for the New Windsor, N.Y, airport with 165 passengers and six crew at 7:27 a.m. But shortly after takeoff, Allegiant said, pilots noticed a slight drop in the plane's level of hydraulic fluid.

Allegiant officials said the fluid never dropped below the minimum level required to operate the aircraft safely. But the crew turned back to the airport, circling for a time over the Gulf of Mexico. That is a routine maneuver to burn off fuel so the aircraft won't be overweight for landing.

"Having been briefed on the prior day's hydraulic leak and subsequent repair … the crew chose to take (the) precaution (of) returning to St. Pete-Clearwater International Airport," the airline said in a statement. "Although inspection of the aircraft by our maintenance team indicates that there is no issue present and that at no point was the aircraft at risk, we support the crew's decision to pre-emptively return to the airport."

The aircraft landed safely shortly before 9 a.m.

Within half an hour after landing, passengers were sent directly to another plane for boarding, a Pinellas County sheriff's deputy said at the scene.

Annamaria Accetta of Tampa had family aboard and learned of the problem while scrolling through Facebook during a break at work. She couldn't reach Allegiant so she drove to the airport.

When the plane landed, Accetta talked to her 11-year-old son and 70-year-old mother on the phone for about five minutes. She told Allegiant representatives there she wanted to see her son, Tommas, who was crying hysterically, she said. But the airline didn't permit her to see him before he boarded the other plane, she said.

"I think I'm about to have a heart attack," Accetta said at the airport. "I'm still shaking."

Retired airline pilot J. Joseph of Joseph Aviation Consulting in Texas said it is a rarity for the same commercial aircraft to be involved in an emergency two days in a row. In decades of flying as a commercial pilot, Joseph said he never experienced repeat emergencies.

"I don't know personally anybody that's had two back-to-back emergencies," Joseph said. "I'm sure it's happened. I sure don't know anybody it's happened to."

This week's emergency landings are reminiscent of an Allegiant MD-88 — 403NV — that experienced four emergencies within six weeks in late 2015, all on flights headed to Florida after reports of smoke or fumes on the aircraft. All landed safely with no passenger injuries.

But it was the summer of 2015 that brought Allegiant, a budget airline headquartered in Las Vegas, the worst publicity of the year.

Three flights made emergency landings at St. Pete-Clearwater for a variety of problems in June and July.

Then in late July, the pilot of a flight from Las Vegas to Fargo, N.D., declared an emergency to land at an airport briefly closed for an air show after he indicated to air traffic control that the plane was dangerously low of fuel. The Federal Aviation Administration later admonished Allegiant for not carrying a sufficient reserve of fuel.

But the worst incident came in August when an aircraft taking off in Las Vegas suffered a jammed elevator, a critical control surface on the tail. The jam occurred at high speed seconds from takeoff.

Mechanics widely quoted in the media said the aircraft likely would have crashed had the pilots not been able to abort takeoff.

Maurice Gallagher Jr., Allegiant CEO and one of the founders of ValuJet, acknowledged to state and local government officials at a Pinellas meeting in April that the airline had experienced a "bad summer."

"When you put people and machines together, there are going to be problems," said Gallagher, blaming problems on growing pains at an airline that has consistently ranked as one of the fastest-growing in the nation.

He cited organizational changes to alleviate problems, including hiring five new mechanics to work out of the Pinellas market and a new management team locally.

Allegiant suffered one more mishap Thursday, though not of a mechanical nature.

After the emergency landing, the airline loaded passengers bound for Cedar Rapids, Iowa, on the aircraft that had the hydraulic problems. But the aircraft was not cleared to fly and still needed to make a test flight, so the passengers were forced to deplane.

Photographer Scott Keeler and staff writer Laura C. Morel contributed to this report. Contact William R. Levesque at levesque@tampabay.com or 813-226-3432.