On the flight upward, his left knee started to lock. Upon landing on the mat at his gym to complete the jump squat, his troublesome knee joint was completely locked.

In the quarter-hour it took for his knee to pop back in, that's when UFC middleweight champion Chris Weidman knew it was time to get the surgery he had been pushing off for a long time.

"If this happens in a fight, I'm out," Weidman told Newsday on Friday. "Or right before fight, I'm not going to be able to train."

That was the second time in a week that his knee locked up because of the meniscus, Weidman said. And that's the one that forced him on Monday to pull out of his title defense at UFC 173 against Lyoto Machida on Memorial Day weekend in Las Vegas. That bout has been rescheduled for Fourth of July weekend at UFC 175 in Las Vegas. The UFC announced Friday that Renao Barao will defend his bantamweight title against T.J. Dillashaw in the new main event at UFC 173.

Weidman will undergo surgery on Tuesday to repair a torn meniscus in both his left and right knees. Dr. Answorth Allen, the same doctor who repaired his labrum at the end of 2012, will perform the procedure at the Hospital for Special Surgery in Manhattan.

"The first time it was really sore," Weidman said. "The second time it was like 10 to 15 minutes before it popped back in."

Subscribe to Newsday’s sports newsletter Receive stories, photos and videos about your favorite New York teams plus national sports news and events. By clicking Sign up, you agree to our privacy policy.

There are two menisci in the knee -- the lateral and the medial -- and these pieces of cartilage help protect the knee joint from the stresses of physical activity.

Weidman (11-0, 7-0 UFC) said he has knee problems since high school. Weidman won a state wrestling title in 2002 for Baldwin High School and was a two-time All-American at both Nassau Community College and Hofstra University.

"It's getting worse, more painful, getting caught longer," Weidman said. "I just gotta get it out of there."

Weidman won the middleweight title last July at UFC 162 when he knocked out Anderson Silva in the second round. It was the first loss in more than seven years for Silva and his first in the UFC.

Weidman successfully defended his title against Silva last December at UFC 168 by technical knockout. Silva broke his left leg when a kick attempt was defended by Weidman in the second round.

The decision to postpone his second title defense was a difficult one, he said. Trainer Ray Longo urged Weidman to make the smart decision -- repair the knees now and be fully healthy for training camp and the fight. Weidman and UFC president Dana White both said that UFC chairman Lorenzo Fertitta had suggested in the past to have the surgery.

Weidman figured that since he needed left knee surgery, he might as well get the right knee fixed at the same time. That would limit the amount of time, calendar wise, he would be out of training, both for this fight and the next one, and beyond.

"It's not like the end of the world to get it taken care of now," said Weidman, 29. "I'm actually really excited about getting the second knee done. That's been annoying me."