* Brazilian investment fund alleges fraud

* Neymar, Barca among those named in lawsuit

* Barca insist club acted within the law (Adds details)

MADRID, June 17 (Reuters) - A Spanish judge has ordered an investigation after accepting a legal complaint filed by Brazilian investment fund DIS that alleges it was the victim of a fraud perpetrated in Barcelona's signing of forward Neymar from Santos.

DIS, which owned 40 percent of Neymar's rights when he was at Santos, alleges it was paid less than half the cash it was entitled to when the player agreed to join the Spanish and European champions in 2013.

Barcelona, former president Sandro Rosell, incumbent Josep Maria Bartomeu, who is standing for re-election, Neymar, his father, Santos and two of the Brazilian club's executives were all named in the lawsuit, according to a court statement published on Wednesday.

Barca published a statement later on Wednesday in which it said the club had acted "fully within the law" and rejected the accusations contained in the suit.

The complaint is the latest twist to a saga that has resulted in Barcelona, Rosell and Bartomeu facing trial for tax fraud over the Neymar deal.

However, this is the first time that Neymar himself has been named as a defendant in a lawsuit linked to the transfer.

Bartomeu was a vice president under Rosell when Neymar was signed in 2013 in a complex deal involving multiple contracts with the player and his father.

Bartomeu, Rosell, who resigned over the allegations, and the club have been accused of defrauding the tax office of some 13 million euros ($14.7 million).

Prosecutors have asked for a prison sentence of two years and three months for Bartomeu and 7-1/2 years for Rosell, plus fines and payments of outstanding taxes totalling more than 60 million euros.

The tax probe was launched after a club member questioned the figures given for the Neymar deal. Barca initially said they paid 57.1 million euros but later admitted the cost was nearer 100 million.

The court said on Wednesday that as part of the probe into the DIS complaint, English clubs Chelsea and Manchester City, Barca's Spanish rivals Real Madrid and German side Bayern Munich had been asked for details of offers they made for Neymar when he was at Santos between 2009 and 2013. ($1 = 0.8873 euros) (Reporting by Iain Rogers, editing by Ed Osmomd and Pritha Sarkar)