EX-5.1 3 a2126690zex-5_1.htm EX 5.1
QuickLinks -- Click here to rapidly navigate through this document


Exhibit 5.1

        [Letterhead of McCarthy Tétrault LLP]

January 13, 2004
CGI Group Inc.
1130 Sherbrooke Street West
5th Floor
Montréal, Québec H3A 2M8

RE: Registration Statement on Form S-8 of 9,357,454 Class A Subordinate Shares

Dear Sirs:

In connection with the registration under the Securities Act of 1933, as amended (the "Act"), by CGI Group Inc., a corporation organized under the laws of Québec (the "Company"), of 9,357,454 Class A Subordinate Shares of the Company without par value (the "Registered Shares"), the following opinion is furnished to you to be filed with the Securities and Exchange Commission (the "Commission") as Exhibit 5.1 of the Company's registration statement on Form S-8 (the "Registration Statement") under the Act. The Registered Shares are to be offered on a delayed or continuous basis pursuant to Rule 415 under the Act in connection with options granted under the Share Option Plan for Employees, Officers and Directors of CGI Group Inc., its Subsidiaries and its Associates (the "Plan").

This opinion is limited to the laws of Québec and the laws of Canada applicable therein and we express no opinion with respect to the laws of any other jurisdiction.

In arriving at this opinion, we have examined such corporate instruments, documents, statements and records of the Company, and we have examined such statutes and regulations and have conducted such legal analysis, as we have deemed relevant, necessary and appropriate for the purposes of this opinion. We have assumed the genuineness of all signatures and the authenticity of all documents submitted to us as originals, the conformity to original documents of all the documents submitted to us as certified or photostatic copies, and the authenticity of the originals of such latter documents.

As to certain factual matters material to the opinion expressed herein, we have relied to the extent we deemed proper upon representations, warranties and statements as to factual matters of officers and other representatives of the Company.

Based on and subject to the foregoing, we are of the opinion that, upon the issuance by the Company of the Registered Shares pursuant to the exercise of options granted under the Plan, upon payment of the exercise price thereof, and upon delivery of certificates representing such Registered Shares in the manner contemplated by the Plan and the authorization relating thereto by the Company's Board of Directors or the proper committee thereof, the Registered Shares represented by such certificates will be duly authorized, validly issued, fully paid and non-assessable by the Company.

We hereby consent to the filing of this opinion as Exhibit 5.1 to the Registration Statement and to the reference to our firm in the Registration Statement or in the Prospectus forming a part of the Registration Statement. In giving such consent, we do not hereby admit that we come within the category of persons whose consent is required under Section 7 of the Act or the rules and regulations of the Commission promulgated thereunder.

Yours truly,
/s/ McCarthy Tétrault LLP




QuickLinks