A man on a flight from Newark to Denver set up a gadget that wouldn’t let the woman in front of him recline in her seat — and she got so mad she tossed a cup of water in his face, forcing the flight to be diverted.

The mid-air meltdown forced Sunday’s United Airlines Flight 1462 to land in Chicago, where the warring passengers both got the boot.

The Knee Defender latches on to the tray table to block your neighbor from reclining.Gadgetduck.com

The beef started because the man, seated in a middle seat, used a “Knee Defender” — a $21.95 gadget that attaches to a passenger’s tray table and stops the person in front of them from reclining.

A flight attendant asked the man to remove the device — which are banned on United and other major US airlines — but he stubbornly refused, saying he needed the space to use his laptop.

The hot-headed female then stood up, whirled around and tossed a cup of water at her tormentor, authorities said.

That’s when United decided to make the unscheduled stop at Chicago’s O’Hare Airport, where the flight was met by Chicago cops and Transportation Security Administration officials.

They questioned the unidentified combatants — both 48 — but did not place either under arrest, determining that the dust up was a customer service issue and not a criminal matter. The jet then continued on to Denver — an hour and 38 minutes late.

Ironically, both passengers were sitting in United’s Economy Plus section, which is advertised as having four more inches of legroom than the rest of coach.