SolarCity reported a third-quarter loss as the largest U.S. rooftop developer poured record revenue into new systems and a panel factory its building in Buffalo, New York.

The loss was $19.1 million, or 20 cents a share, compared with net income of $19.2 million, or 19 cents, a year earlier, the San Mateo-based company said in a statement Thursday. Excluding some items, it lost $2.10 a share, exceeding the $1.91 average loss of 17 analysts’ estimates compiled by Bloomberg. Sales rose to $113.9 million from $58.3 million.

The company has lost money in all but two quarters since its December 2012 initial public offering, directing revenue into new installations and other efforts that will drive growth.

SolarCity began offering systems to small businesses during the quarter and acquired a developer in Mexico in its first international expansion. The company’s 100-megawatt pilot factory in Fremont is scheduled to reach full production this year, turning out panels with a 22.04 percent efficiency, the highest in the industry. Its 1-gigawatt Buffalo plant will begin operating in 2017.

Chief Executive Officer Lyndon Rive also initiated a hiring spree that included adding 500 employees in a single day, a sign the company plans to continue its aggressive growth, according to Ben Kallo, an analyst at Robert W. Baird & Co.

“We expect SolarCity to continue to maintain or gain market share,” Kallo said in a note to clients Monday. He has the equivalent of a buy rating on the shares and a $68 target price.”It has been ramping its sales force to meet accelerating demand.”