SAN FRANCISCO — Shares of Logitech International SA rose on Thursday after the maker of computer accessories and other gadgets posted a surprise profit and stronger-than-expected revenue in its fiscal first quarter.

The results signal that the company is weathering the decline of personal computers better than investors may have anticipated.

Logitech said on Wednesday that it earned $1 million, or 1 cent per share, in the April-June period. In the same quarter last year, it posted a loss of $51.4 million, or 32 cents per share.

Revenue rose 2 percent to $477.9 million from $468.6 million.

Analysts, on average, were expecting a loss of 7 cents per share on revenue of $423 million, according to a poll by FactSet

Logitech International SA, which is based in Switzerland, makes computer accessories such as keyboards and mice, video conferencing equipment and other gadgets.

For the full fiscal year, which ends in March, Logitech expects revenue of $2 billion, slightly above analysts' estimate of $1.99 billion.

Shares rose 68 cents, or 10 percent, to $7.14 in afternoon trading. The stock has traded between $6.24 and $10.29 in the past 52 weeks.