A quarter of a million Twitter users have had their accounts hacked in the latest in a string of high-profile security breaches at internet firms.

Anonymous hackers may have been able to gain access to around 250,000 accounts on the social networking site, including usernames, email addresses and passwords.

Twitter announced on Friday it had detected unusual access patterns across the network and had identified unauthorised attempts to access user data that had led to accounts being compromised.

The site discovered one live attack that it was able to shut down several minutes later but not before the hackers had gained access to thousands of accounts.

Bob Lord, Twitter's director of information security, said the attack was "not the work of amateurs" and the company did not believe it was an isolated incident.

"Our investigation has thus far indicated that the attackers may have had access to limited user information – usernames, email addresses, session tokens and encrypted/salted versions of passwords – for approximately 250,000 users," Lord said. "As a precautionary security measure, we have reset passwords and revoked session tokens for these accounts.

"This attack was not the work of amateurs, and we do not believe it was an isolated incident. The attackers were extremely sophisticated, and we believe other companies and organizations have also been recently similarly attacked."

The attack on Twitter is the latest in a string of high-profile security breaches on US technology and media companies. Both the Wall Street Journal and the New York Times have had their sites hacked in the last two weeks and Apple and Mozilla have turned off Java by default in their browsers to minimise the risk.

Twitter users who have had their accounts breached will have to reset their passwords before they will have access to the site.

• This article was amended on 4 February 2013. The original said that hackers were able to gain access to personal details rather than may have been able to do so. This has been corrected.