Twitter has introduced technology to boost security for its users.

The move follows a spate of attacks on accounts of major media outlets, including the Associated Press and the Financial Times.

The site said that it had begun rolling out an optional "login verification" service to thwart hackers.

Security experts welcomed the move as a positive step toward securing the service.

Twitter had come under fire over the past year for failing to offer such an option, which is known as two-factor authentication, amid a surge in breaches of high-profile accounts.

That criticism intensified in April after a fake tweet about a non-existent White House explosion was sent from the Associated Press account.

The micro blogging site transmits around 400 million messages a day.

When users log in to Twitter via a web browser, they must confirm their identity by entering a six-digit code that Twitter delivers to their smartphones.

To access the service through applications for PCs and smartphones, users must use an automatically generated temporary password for each of the programmes.

Twitter described the offering in a blog post, reminding users that they still need to use strong passwords to keep accounts secure.

The approach is similar to security tools previously introduced by other internet services from companies including Facebook, Google and Microsoft.

Jeffrey Carr of cyber security company Taia Global said the hackers looking to break into corporate accounts will still be able to do so if they can take control of PCs or smartphones running applications authorised to use the service.

"Two-factor authentication isn't perfect," Mr Carr said. "If you own the machine, it really doesn't matter."