The Street illustration

Shares of Sanmina Corp. (SANM - Get Report)  rose 16.9% to $31.85 by the close of trading on Tuesday after the electronics manufacturing services company beat Wall Street's fiscal first-quarter earnings forecasts and issued better-than-expected guidance.

The San Jose-based company posted net income of $38 million, or 54 cents a share, compared with a losses of $154.9 million, or $2.16, a year ago. Adjusted earnings totaled 83 cents a share, beating analysts' expectations of 71 cents.

Sanmina reported revenue of $2.19 billion, up from $1.74 billion, and ahead of Wall Street's forecasts of $1.9 billion.

Sanmina said that it expects second-quarter earnings of 70 cents to 80 cents a share on sales of $1.9 billion to $2 billion. Analysts are forecasting earnings of 66 cents a share and sales of $1.83 billion.

"Looking ahead, our customer base and pipeline remain solid. Based on our solid first quarter results and with our outlook for the second quarter, we are confident we will profitably grow revenue and strengthen our financial results in fiscal 2019," CEO Michael Clarke said in a statement.

Separately, Sanmina said that Chief Financial Officer David Anderson plans to retire after 17 years with company to spend more time with his family. Anderson will continue as CFO until a successor is named, the company said, and then will move to an advisory role until March 27, 2020. Sanmina said its has started searching for his successor.