Shares of Comtech Telecommunications Corp. soared 21.5 percent to $13.52 in midday trading Thursday after the Melville-based manufacturer reported second quarter net income of $6.6 million, or 28 cents per diluted share, after the market close on Wednesday.

Net income for the year-earlier quarter was $2.5 million, or 15 cents per diluted share.

advertisement | advertise on newsday

The stock closed up nearly 24 percent, at $13.78.

Despite Thursday’s rally, Comtech shares remained down more than 36 percent for the trailing 12 months.

On Wednesday, the maker of advanced telecommunications equipment for the military and civilian markets reported net sales of $139 million for the quarter ended Jan. 31. That was nearly twice the net sales in the year-earlier period as a result of the acquisition of Annapolis, Maryland-based TeleCommunication Systems Inc. in February 2016.