(Corrects beginning of third paragraph to read Apart from 2009... not 2010, as earlier sent)

Goldman Sachs was the top global mergers and acquisitions adviser last year, retaking the position from rival Morgan Stanley, which derailed its multiyear grip on the ranking in 2009.

Investment banks Goldman Sachs and Morgan Stanley have been neck-and-neck in the M&A stakes throughout the year, according to Thomson Reuters data, ahead of rivals JP Morgan, Credit Suisse, Deutsche Bank, UBS, Bank of America and Citigroup.

Apart from 2009, when it was unseated by Morgan Stanley, Goldman held the top spot in M&A for every year since 1997, Thomson Reuters data shows.

It returned to the top spot in 2010 in terms of the value of deals advised on. Goldman advised on 370 deals worth $554.5 billion in 2010, compared with Morgan Stanley's 394 deals worth $538.1 billion.

The figures include a deal announced on the last day of the year by CVS Caremark to buy Universal American's Medicare prescription drug business for about $1.25 billion. Goldman advised Universal American and Morgan Stanley advised CVS, according to Thomson Reuters data.

(Reporting by Megan Davies; Editing by Tim Dobbyn)