(Reuters) — Verizon Communications, the No.1 U.S. wireless carrier, is buying wireless spectrum holder Straight Path Communications for an enterprise value of about $3.1 billion, ending a bidding war with rival AT&T.

The $184 per share all-stock offer represents a discount of 17.8 percent to Straight Path’s close on Wednesday and has an equity value of $2.3 billion.

The stock surged nearly five-fold since April 7, a day before the company first received a $95.63 per share takeover bid from AT&T.

Straight Path’s shares, which had jumped 39 percent since Verizon made its final bid on Monday, plunged 20 percent to $178 on Thursday, indicating some investors were disappointed with the deal.

Straight Path, which holds a large trove of 28 GHz and 39 GHz millimeter wave spectrum used in mobile communications, will give Verizon an advantage in fifth-generation (5G) network development.

5G networks are expected to offer faster downloads and boost internet-reliant products such as self-driving cars.

Straight Path had said on Monday an unnamed telecommunications company had raised its offer to buy the company. Reuters reported, citing sources, that the unnamed bidder was Verizon.

Verizon’s bid tops AT&T’s offer of $95.63 per share, or $1.25 billion, which was announced last month.

Straight Path, which earlier agreed to be bought by AT&T, said it would terminate the previously announced deal.

Verizon will pay, on behalf of Straight Path, a termination fee of $38 million to AT&T.

Evercore was financial adviser to Straight Path and Weil, Gotshal & Manges served as company counsel on the deal.

Debevoise & Plimpton LLP served as counsel to Verizon.

(Reporting by Rishika Sadam in Bengaluru; Editing by Saumyadeb Chakrabarty)