Captured fugitive David Sweat has confessed that he and fellow inmate Richard Matt planned to flee to Mexico, but were foiled after Joyce Mitchell failed to meet them with a car, sources told The Post on Monday.

Sweat told investigators that he and Matt didn’t have a backup plan following their June 6 escape, and that they split up five days ago because Matt was slowing him down, sources said.

Sweat — who was shot and captured Sunday afternoon, ending his 23rd day on the run — is also coughing up details about the stunning prison break.

Matt was fatally shot by a fed on Friday when he refused to drop a stolen shotgun, and Sweat was nabbed while trying to run into woods just two miles from the Canadian border.

Matt had previously run away to Mexico after torturing, killing and dismembering an ex-boss in upstate New York, but he committed another murder there and was locked up for years before being returned to the US and imprisoned.