Analysts who follow Sycamore Networks ( SCMR) were expecting the company to post a loss in the fiscal fourth quarter, but the optical-networking outfit surprised Wall Street with a profit, helping lift its shares Tuesday.

For the fourth quarter ended July 31, the company earned $1.4 million, or 1 cent a share, compared with a loss of $9.2 million, or 3 cents a share, in the year-ago period.

Revenue for the fourth quarter was $18.5 million, up from $14.5 million last year.

Analysts surveyed by Thomson First Call were looking for a loss of 2 cents a share. Sycamore shares were up 12 cents, or 3.3%, to $3.77 in premarket trading.

More from Technology

Elon Musk's Latest Twitter Tirade Is the Dumbest Thing on Wall Street

Elon Musk's Latest Twitter Tirade Is the Dumbest Thing on Wall Street

Flashback Friday: Amazon, Chip Stocks, Memorial Day

Flashback Friday: Amazon, Chip Stocks, Memorial Day

Some Companies Are Already Feeling the Effect of GDPR

Some Companies Are Already Feeling the Effect of GDPR

Experts Break Down GDPR Risks for Investors

Experts Break Down GDPR Risks for Investors

Netflix Ready to Surpass Disney as America's Most Valuable Media Company

Netflix Ready to Surpass Disney as America's Most Valuable Media Company