For a wheeler-dealer who not that long ago was running a nightclub in Caminha, a resort town north of Porto, Jorge Mendes's ascent to football "super-agent" has been stratospheric. His Gestifute agency harbours most of Portugal's stellar names – José Mourinho, Cristiano Ronaldo, Ricardo Carvalho – as well as Bébé, the former third division striker Manchester United signed this summer. In a few short years, Mendes has made enormous money from football as his client players have joined United, Chelsea and Real Madrid; he is reported to have received €3.6m of the €9m United paid for Bébé, earned handsomely when Real Madrid signed Ronaldo from United for £81m in 2009, and untold millions from other deals.

Last month, the Globe Soccer Awards in Dubai, describing itself as "an annual meeting for all [football's] main market operators", declared Mendes "agent of the year" for 2010 accompanied by a video featuring high praise from Mourinho and Ronaldo. Mendes's own Gestifute agency humbly interpreted the award on its website as: "Jorge Mendes proclaimed world's best businessman".

Yet the football public still knows painfully little about how the game's multimillion‑pound transfer business is done, or how so-called "super-agents" actually earn their money. After United's extraordinary signing of Bébé his former agent, Gonçalo Reis, complained he had been cut off by the player before Mendes moved in and earned prodigiously from the €9m (£7.5m) deal. Since then, the Guardian has discovered there is a lawsuit against Mendes proceeding at glacial pace through the concrete-pillared district court in Porto brought by Formation, the English football agency formerly run by Paul Stretford, Wayne Rooney's agent.

It exposes an illuminating, bitterly disputed account of Mendes's rise to the big time, with Formation claiming Mendes reneged on a partnership with it once his client, Mourinho, moved to Chelsea as manager. The case also lays bare what supporters are never told of how football really works, including exactly how much Mendes was paid when three of his clients – Carvalho, Paulo Ferreira and Tiago Mendes – were signed by Mourinho for Chelsea in July 2004.

Chelsea's contracts both with the players and with Mendes, seen by the Guardian, show that Chelsea paid Mendes for acting both for the players and the club, but presented €2.45m not just as payment for completing the transfers, but for a baffling range of services, including ensuring his millionaire players turned up for training on time. All of that was permitted at the time by the Football Association, which still, following a U-turn last year, allows agents to act for both clubs and players in the same transfer.

The origins of the falling out between Formation and Mendes lie in Lisbon, in March 2002. There Stretford was introduced to Luis Correia, Mendes's nephew and a Gestifute director, by Carlos Freitas, a Sporting Lisbon director, who suggested they work together to move Portuguese players to England's money-soaked Premier League. Mendes, with close relationships at Sporting and Porto, had signed up most of Portugal's fine generation of players, many of whom would come to prominence when Mourinho's Porto won the 2004 Champions League.

In the court claim, seen by the Guardian, Formation argues that it agreed with Mendes to promote and represent Gestifute's Portuguese players in England, to share fees equally when moves were concluded, and that in May 2003 the two agencies signed a written agreement to that effect. Formation claims it shared its agents' fees exactly 50-50 in June 2002 when Sporting's Hugo Viana signed for Newcastle – Mendes's first major international deal – then when Nuno Capucho joined Rangers in June 2003.

Mendes did, according to the claim, share part of the fee he received from United when Ronaldo signed from Sporting Lisbon as a miraculously gifted 18-year-old in August 2003. However, after Mourinho joined Chelsea the following summer and immediately signed Carvalho, Tiago and Ferreira for a combined £41m, Mendes paid nothing to Formation. The relationship between the two agencies broke down, and Formation sued Gestifute, for half the fees Mendes was paid in those Chelsea deals, and in Ronaldo's transfer.

Tony Henry, the former Manchester City and Stoke City midfielder who was the main Formation agent promoting Gestifute players in England, remains furious. "I gave two and a half years of my life to Mendes," Henry, now chief scout at Everton, says. "I worked non-stop, introducing him to people, trying to get his players into clubs. We shared our fees honourably, but then once he knew people, and got Mourinho into Chelsea, he went on his own."

In its defence, also seen by the Guardian, Mendes's Gestifute company in Porto claimed it received "nada" – nothing – when Carvalho, Tiago and Ferreira joined Chelsea. Formation's Lisbon-based lawyers reacted by obtaining, via English and Portuguese court orders, Chelsea's original contracts with Mendes, which show that Chelsea paid Gestifute €2.9m in total when the players signed.

Formation accused Gestifute in court documents of having "lied barefacedly and shamelessly" for arguing it was paid nothing. Gestifute responded that its defence was correct because the €2.9m had been paid to Gestifute International Limited, a company registered in Ireland where corporate tax rates are much lower.

Formation is pushing for a court hearing at which Mourinho and Ronaldo are listed as court witnesses for Gestifute, as well as Peter Kenyon, who as chief executive both at Manchester United and Chelsea agreed the big deals with Mendes, and now has a formal partnership, as managing partner of the sports marketing company, CAA, to promote Mendes's players commercially. Arsène Wenger is understood to be proposed as a Formation witness – Arsenal were negotiating the details of a move for Ronaldo in 2003, right up until the player signed for United.

For all that Mendes is now dubbed a "super-agent", involved with players across Europe and South America, often part-owning their "economic rights", which gives him a cut of transfer fees, it is generally acknowledged that Hugo Viana, a slight 19-year -old who did not flourish at Newcastle, was Mendes's first major international football transfer.

Formation says it did most of the work; Henry had flown for his first meeting with Mendes in May 2002 to Switzerland, where Portugal's Under-21 team were playing Italy in the European Championships. Henry recommended Viana, then young European footballer of the year, to Stretford, who had very close links with Newcastle – Kenneth Shepherd, son of the club's then major shareholder, Freddy, worked for Formation. Charlie Woods, Newcastle's chief scout, went with Henry to watch Viana in the next game, and within a month, Stretford, Freddy Shepherd and Douglas Hall, Newcastle's other major shareholder, were meeting Mendes and Sporting directors in Lisbon to finalise Newcastle's signing of Viana, for £8.5m.

"Mendes was big in Portugal," says Henry, "wasn't known in England. A month after meeting us, we'd got one of his players a move to a major club and made him a lot of money."

The agent's fee paid by Newcastle, according to Formation's court claim, was £300,000. Stretford did the negotiations, the money was paid to Formation, and although no written partnership contract with Gestifute was yet in place, Formation agreed to share the fee exactly equally, £150,000 each, with Mendes's agency.

Stretford and Henry continued to promote Gestifute players to English clubs, particularly Ronaldo, the 17-year old sensation, whom they took to meet Wenger at Arsenal's training ground in November 2002. The two agencies signed the formal partnership agreement, for a two-year period, beginning on 27 May 2003. The first deal concluded after that was not Ronaldo but the winger Nuno Capucho, signed by Rangers for £670,000.

When United gazumped Arsenal for the signing of Ronaldo – paying £12.24m, far more than the €6m Arsenal were discussing – Mendes handled negotiations directly with Sir Alex Ferguson and Kenyon. The following day, according to the claim, Mendes told Stretford his fee for the Ronaldo deal was €400,000 and offered to pay Formation £80,000 in full settlement. Formation claims Stretford accepted because he wanted to preserve a profitable relationship, so it was deeply aggrieved when United published in their 2004 accounts that the payment to agents on the Ronaldo deal had been £1.129m.

After the Ronaldo signing, Formation says it pressed on with the partnership. No further deals were concluded, however, until after Porto beat Monaco 3-0 in the Champions League final on 26 May 2004, their team including Ferreira, Carvalho, Pedro Mendes and Deco – all Mendes clients. Days later, on 2 June, Kenyon, by then Chelsea's chief executive, unveiled Mourinho as the new manager. Chelsea then paid Porto £13.2m to sign Ferreira, £19.85m (a round €30m) for Carvalho, and £8m to Benfica for Tiago, all in July 2004.

Mendes negotiated those deals directly, according to Formation's claim, and did not report his fees to Formation or pay it anything. Mendes reacted by saying Formation had now itself breached their contract, so he would regard the partnership as ended. Formation sued Gestifute for the half of the fees it claimed were due.

Chelsea's original contracts, with the players and Mendes, obtained via court order in Portugal and which the Guardian has seen, reveal that the club paid Gestifute €2.9m in agents' fees, and shine a revelatory light into how football works. Agents were, still are, permitted to act for both a club and a player in transfer deals. Although that is an apparent breach of Fifa rules requiring agents to act with no conflicts of interest, the FA at the time allowed it. Subsequently the FA introduced a rule requiring players, not clubs, to pay agents, but after an outcry by agents they are now allowed to act for both again, as long as the players state they are happy with the arrangement.

Chelsea's contracts with Carvalho, Ferreira and Tiago were all for three years and set out the players' salaries – Carvalho starting on £2.18m a year "basic", plus bonuses and benefits including all housing costs; Ferreira £1.55m a year basic, Tiago £1.25m. Each included an agent's fee of €150,000 paid by the club to Gestifute SA, Mendes's Portuguese company, on behalf of the player.

Chelsea had separate agreements to pay much more. These were with Gestifute International, a company registered in Ireland, and were signed by Correia and Mendes. Identical other than the amounts involved, the three contracts include that lower fee, €150,000, to Gestifute for "acting on the player's behalf", which also appeared in each player's own contract. Then there are bigger payments: €1,050,000 for the Carvalho deal, €1,050,000 for Ferreira, €350,000 in Tiago's – €2.45m in total – for three duties ostensibly nothing to do with acting on the transfer itself.

The first was to pay Mendes "to facilitate the renegotiation of the player's contract with the club". The second, remarkably, was to "look after the wellbeing of the player … the agent will do his best to ensure that the player … timeously [sic] attends training and matches." The third was for Mendes to "act as a consultant … to secure any image rights attached to the player for the club".

Despite the description of those duties, the FA has confirmed that Chelsea paid the whole €2.9m through it, as English football's "transfer clearing house". Sources close to the arrangement have told the Guardian this was common practice at the time, with clubs describing such duties in contracts, indicating the fees were not paid to the agent for working on behalf of the club in the transfer. Chelsea, however, declined to comment when asked why they had framed Mendes's agents' fees as payment for such services.

The disclosure of these contracts led Formation's lawyers to accuse Gestifute of having "lied barefacedly and shamelessly" when it claimed it had received "no commission whatsoever" for the Chelsea deals. Gestifute's lawyers responded by saying that statement was true, because all payments were to Gestifute International, the Irish company. Contacted by the Guardian with a series of questions about the case, a spokesman for Gestifute said: "This is a normal commercial dispute. The matter is being dealt by our lawyers, and we are very confident that the Court will decide on our favour." Formation would not discuss the issues, saying: "We are making no comment as there is currently a legal dispute with Gestifute waiting to be heard in Portugal."

The garland of "super-agent" is accorded to just one or two of football's fixers, informed by very little insight into what they actually do. For Jorge Mendes the case crawling through the court in Porto reveals a great deal about how he – and football at the highest level – conducts their business.