The upcoming UFC Fight Night card in San Antonio finally has a main event as former champion Rafael dos Anjos will face Leon Edwards in a five-round battle in the welterweight division.

UFC president Dana White confirmed the fight via Yahoo! Sports on Thursday.

The search for a headliner for the ESPN card in Texas was coming down to the wire with the event scheduled for July 20 and limited options as time was running out.

Several possible matchups were floated including a potential quick turnaround for UFC women’s flyweight champion Valentina Shevchenko as well as moving a light heavyweight fight between Luke Rockhold and Jan Blachowicz from UFC 239 to the show in San Antonio instead.

Neither of those options materialized so the UFC shifted gears yet again and turned to dos Anjos and Edwards instead.

Dos Anjos is coming off a fourth-round submission win over Kevin Lee in his most recent outing in May, which got him back on track following back-to-back losses to current welterweight champion Kamaru Usman and former interim champion Colby Covington.

Meanwhile, Edwards is riding a seven-fight win streak in the division including wins over Gunnar Nelson, Donald “Cowboy” Cerrone and Vicente Luque.

Edwards has been itching for a top opponent as he looked to get an eighth straight win in a row but more importantly a chance to climb closer to title contention.

Now he’ll get that chance with Edwards accepting a fight against dos Anjos on just over four weeks’ notice as he prepares for a main event slot for the card in San Antonio on July 20.