Image caption Carnegie Mellon's graduate computer science programme is tied for the top-ranking programme in the US

Carnegie Mellon University has apologised after it mistakenly sent out 800 admission letters via email to its prestigious computer science programme.

Applicants to the top-ranked graduate programme received the erroneous email that they were "one of the select few" admitted, on Monday morning.

Emails correcting the computer glitch went out almost seven hours later.

The US university said the error was the "result of serious mistakes" in generating acceptance letters.

Carnegie Mellon said it was "currently reviewing our notification process to help ensure this does not happen in the future".

Based in Pittsburgh, Pennsylvania, Carnegie Mellon ranks alongside the Massachusetts Institute of Technology and Stanford University in California as one of the top schools for computer engineering in the US.

"We understand the disappointment created by this mistake, and deeply apologise to the applicants for this miscommunication."

Ben Leibowitz said he called up his relatives to share the good news when he got the initial email, then went out to dinner to celebrate with his parents.

But hours later, he got a second email, informing him he was not actually among one of 100 students accepted to the computer science programme.

"It was brutal. I didn't get much sleep last night,'' Mr Leibowitz told the Associated Press news agency. "Now I have to clean up the mess. I'm calling all my relatives, I'm going, 'I'm sorry it's not happening.'"

The university is not the first to send out acceptance letters to those not actually admitted to competitive programmes.

In December, Johns Hopkins University mistakenly sent nearly 300 undergraduate applicants welcome messages when they were actually rejected or deferred.

And in 2009, the University of California at San Diego sent acceptance emails to their entire applicant pool that year - 46,000 students.