Linfield edged out Ballymena at Windsor Park to leapfrog the Sky Blues in the table and move into a top-six position.
Michael Gault created the first goal by picking up the ball, seeing off a number of challenges and crossing for Nathan Hanley to slot home after 26.
Gary Browne stroked home a 44th-minute penalty after Daryl Fordyce had been fouled by Gary Thompson in the area.
Alan Blayney twice denied David Cushley but Aaron Stewart thumped past the keeper on 79 when left unchallenged.
The Blues' best chance of the second half fell to Johnny Black, but he fired wide of the post.
The defeat sees Ballymena continue their poor league record at Windsor Park, which now stands at one win in their last 20 visits.
The two sides will meet again in Tuesday night's County Antrim Shield final at the Oval.