(Reuters) - Cisco Systems Inc CSCO.O reported higher-than-expected quarterly revenue and profit, helped mainly by strong demand for its security products.

FILE PHOTO - The logo of Dow Jones Industrial Average stock market index listed company Cisco is seen in San Diego, California April 25, 2016. REUTERS/Mike Blake/File Photo

The company’s shares, which had risen 27 percent in the past 12 months to touch a more than nine-year high on Wednesday, were down 1.3 percent at $32.40 after the bell.

Revenue in the security business, which offers firewall protection and breach detection systems, rose 14 percent to $528 million. Analysts on average had expected $519.1 million, according to market research firm FactSet Street Account.

Revenue in the legacy switching business, still by far its largest, fell 5 percent to $3.31 billion in the second quarter, compared with the average estimate of $3.38 billion, according to FactSet Street Account.

The hardware business has been struggling amid stiff competition from companies such as Juniper Networks Inc JNPR.N and weak spending by telecom carriers and enterprises.

To offset sluggish demand for its traditional lineup of switches and routers, Cisco has been focusing on areas such as security, the internet of things and cloud computing.

Excluding items, the company earned 57 cents per share beating the average analyst estimate by a cent, according to Thomson Reuters I/B/E/S.

Cisco said it expected an adjusted profit of 57 cents-59 cents per share for the current quarter. Analysts on average were expecting a profit of 58 cents.

The company’s net income fell to $2.35 billion, or 47 cents per share, in the second quarter ended Jan. 28 from $3.15 billion, or 62 cents per share, a year earlier.

Revenue fell 2.9 percent - the fifth straight quarterly decline - to $11.58 billion.