A few days ago, Gilbert Melendez fought another top rated lightweight in Eddie Alvarez at UFC 188 in Mexico City.

He lost by decision, but it was his opponent Alvarez who ended up with a trip to the hospital and a six month medical suspension.

Melendez, as his teammate Nate Diaz boasted, came out relatively unscathed.

It looks like that is about to pay off — as the fighter will get another shot in the Octagon in just less than four weeks.

Last night on UFC Tonight, it was revealed that Melendez has agreed to step in to fight Al Iaquinta next month at UFC Fight Night 71. As was the case in his bout against Alvarez, the fight will serve as the show’s co-main event.

Bobby Green was originally scheduled to face Iaquinta, but was forced to pull out due to injury.

Iaquinta is 12-3-1 in MMA and currently enjoying a four-fight winning streak. Most recently, he defeated Jorge Masvidal by split decision, leading to a memorable confrontation with some unruly fans in the crowd.

Melendez is 22-5 in MMA, but has now lost three of his last four bouts. A former lightweight champion for Strikeforce, Melendez lost by submission — the first and only loss via finish in his career — to the UFC’s then-champion Anthony Pettis last year.

UFC Fight Night 71 is scheduled for July 15 in San Diego, CA; and expected to be broadcast on FOX Sports 1. Frank Mir is to face Todd Duffee at heavyweight in the main event.