Document:

<PAGE>

                                                                  Exhibit 10.5.1

                                                                  EXECUTION COPY

                            STOCK PURCHASE AGREEMENT

     This is a Stock Purchase Agreement (this "Agreement") dated as of November
16, 1998 between PAETEC CORP., a Delaware corporation with its principal place
of business at 290 Woodcliff Drive, Fairport, New York 14450 (the "Company"),
and AT&T COMMERCIAL FINANCIAL CORPORATION, a Delaware corporation with its
principal place of business at Two Gatehall Drive, Parsippany, New Jersey 07054
("Purchaser").

                                    RECITALS

     A.    In order to provide funds for the acquisition, construction and
operation of switch-based telecommunications systems owned and operated by the
Company in the United States of America, certain subsidiaries of the Company
have entered into a Loan and Security Agreement of even date herewith (the "Loan
Agreement") with Purchaser.

     B.    The obligation of Purchaser to make the initial Loan (as defined in
the Loan Agreement) under the Loan Agreement is subject to the execution and
delivery of this Agreement.

     C.    The Company is a Delaware corporation having 35,000,000 shares of
authorized capital stock, 27,500,000 of which are designated Class A common
stock, $.01 par value per share ("Class A Common Stock), and 7,500,000 of which
are designated Class B common stock, $.01 par value per share ("Class B Common
Stock").

     D.  Purchaser desires to purchase, and the Company agrees to sell, shares
of the Class A common stock of the Company pursuant to the terms and conditions
of this Agreement.

     NOW, THEREFORE, in consideration of the commitment of Purchaser to make the
initial Loan under the Loan Agreement and of the mutual promises set forth in
this Agreement, the parties hereto agree as follows:

     1.  Purchase of Shares.
         ------------------

         (a) The Company hereby agrees to sell to Purchaser, and Purchaser
hereby agrees to purchase from the Company, 600,000 shares (the "Shares") of the
Company's Class A Common Stock at a price of $2.50 per Share (the "Purchase
Price") payable in full on or before November 23, 1998.  A stock certificate
evidencing the Shares shall be issued in the name of Purchaser upon receipt of
this executed Agreement and payment in full of the Purchase Price.  Unless
otherwise requested by Purchaser, it will receive one certificate for the
Shares.
<PAGE>

     2.   Condition Precedent.   Purchaser shall not be obligated to purchase,
          -------------------
and the Company shall not be obligated to sell, the Shares until the closing of
the transactions contemplated by the Loan Agreement and the effectiveness of
Purchaser's commitment to make the initial Loan under pursuant thereto.

     3.   Representations and Warranties of Purchaser.  In order to induce the
          -------------------------------------------
Company to issue the Shares, Purchaser represents and warrants to the Company as
follows:

          (a) Purchaser is acquiring the Shares for its own account, with no
present intention of reselling, distributing or otherwise transferring the
Shares or any portion of the Shares to any third party.

          (b) Purchaser understands and acknowledges that the Shares are being
offered and sold under one or more exemptions provided in the Securities Act of
1933, as amended (the "Securities Act"), Regulation D promulgated thereunder and
applicable state securities laws, and that this transaction has not been
reviewed or passed upon by the United States Securities and Exchange Commission
(the "Commission"), or any other federal or state agency.

          (c) Purchaser is a corporation, not formed for the specific purpose of
acquiring the Shares, with total assets in excess of $5,000,000.

          (d) Purchaser realizes that Purchaser must bear the economic risk of
investment for an indefinite period of time because (i) the Shares have not been
registered under the Securities Act and cannot be resold by Purchaser unless
they are subsequently registered under the Securities Act or an exemption from
registration is available, and (ii) there currently is no public market for the
Shares, and Purchaser may not be able to liquidate the investment in the Shares
in the event of an emergency.  Purchaser has no need for current liquidity of
investment with respect to the Shares.

     4.   Representations and Warranties of the Company.  In order to induce
          ---------------------------------------------
Purchaser to purchase the Shares, the Company represents and warrants to
Purchaser as follows:

          (a) The Company's authorized capital consists of (i) 27,500,000 shares
of Class A Common Stock, of which 8,399,952 shares are issued and outstanding or
are committed to be issued (ii) and 7,500,000 shares of Class B Common Stock, of
which 6,285,048 shares are issued and outstanding or are committed to be issued.
A list of the current stockholders with the number and class of shares owned by
each is attached hereto as Schedule 1.  The Company has reserved 4,300,000
                           ----------
shares of Class A Common Stock for issuance under the Company's 1998 Incentive
Compensation Plan.  Except as described in this Section and Schedule 1, as of
                                                            ----------
the date of this Agreement, there are no outstanding subscriptions, options,
warrants, calls, rights or other agreements or commitments obligating the
Company to issue, sell, deliver or transfer (including any right of conversion
or exchange under any outstanding security or other instrument) any shares of
the capital stock of the Company.  Except as described in this Section and in
Schedule 1, there are no agreements, arrangements, rights or commitments of any
----------
character relating to the issuance, sale, purchase or redemption, or restricting
the transfer of, or the declaration of payment of dividends on, any shares of
the capital stock of the Company.  Except as described in Schedule 1, no
                                                          ----------
shareholder of the Company is a party to any voting agreement, voting trust,

                                       2
<PAGE>

irrevocable proxy or other agreement affecting the voting rights of any shares
of capital stock of the Company or any agreement providing for any "put" or
"call" option, right of first refusal or offer or other right to acquire or
dispose of any shares of the Company's capital stock or options or warrants.
All outstanding shares of capital stock of the Company have been duly and
validly authorized and issued, are fully paid and non-assessable, and have been
issued free of any lien, security interest, pledge, charge or encumbrance of any
kind (collectively, "Encumbrances").

          (b) The Company was incorporated on May 19,1998.

          (c) The Company is a corporation duly organized and existing under the
laws of the State of Delaware and is in good standing under such laws.  The
Company is duly qualified and licensed in each jurisdiction where the nature of
the business conducted by it requires such qualification, except where the
failure to qualify would not have a material adverse effect upon the Company's
financial condition or results of operations.  The Company has the requisite
corporate power and authority to own or lease and operate its properties and
assets, and to carry on its business as proposed to be conducted.

          (d) The Company has all requisite corporate power to execute and
deliver this Agreement and to sell and issue the Shares hereunder, and to carry
out and perform its obligations under the terms of this Agreement.

          (e) Neither the Company nor any subsidiary thereof owns, directly or
indirectly, of record or beneficially, any capital stock or equity interest or
investment in any corporation, association or business entity, except with
respect to PaeTec Communications, Inc. and PaeTec International, Inc., each of
which is a wholly owned subsidiary of the Company (the "Subsidiaries").  Each of
the Subsidiaries is a corporation duly organized and existing under the laws of
the State of Delaware and is in good standing under such laws.  Each Subsidiary
has the requisite corporate power and authority to own or lease and operate its
properties and assets, and to carry on its business as proposed to be conducted.
Neither the Company nor any Subsidiary is a partner or participant in any
partnership or joint venture.  The shares of capital stock of each

Subsidiary held by the Company are free of any Encumbrances.

          (f) All corporate action on the part of the Company, its directors and
stockholders necessary for the authorization, execution, delivery and
performance by the Company of this Agreement and the consummation of the
transactions contemplated herein and for the authorization, issuance and
delivery of the Shares has been taken.  This Agreement constitutes a valid and
binding obligation of the Company, enforceable in accordance with its terms,
subject to laws of general application relating to bankruptcy, insolvency, and
the relief of debtors and other laws of general application affecting
enforcement of creditors' rights generally, including rules of law governing
specific performance, injunctive relief or other equitable remedies.  The
Shares, when issued in compliance with the provisions of this Agreement, will be
validly issued, fully paid and nonassessable, free of preemptive rights and will
be free of any Encumbrances, and will be free of restrictions on transfer other
than under state and/or federal Securities laws.

                                       3
<PAGE>

          (g) No consent, approval, qualification, order or authorization of, or
filing with, any governmental authority or any third party is required in
connection with Company's valid execution, delivery or performance of this
Agreement, or the offer, sale or issuance of the Shares by the Company.

          (h) The Company has good and marketable title to its properties and
assets and, with respect to the property and assets leased by the Company, holds
valid leasehold interests therein, in each case subject to no mortgage, pledge,
lien, security interest, conditional sale agreement, encumbrance or charge,
except (i) tax, materialmen's or like liens for obligations not yet due or
payable or being contested in good faith by appropriate proceedings, or (ii)
possible minor liens or encumbrances which do not materially detract from the
value of the property subject thereto or materially impair the operations of the
Company and which have arisen in the ordinary course of business.

          (i) Subject to the truth and accuracy of Purchaser's representations
set forth in this Agreement, the offer, sale and issuance of the Shares as
contemplated by this Agreement are exempt from the registration requirements of
the Securities Act and from any applicable blue sky laws.  Except as set forth
in Schedule 1, the Company has not offered the Shares to any Person other than
   ----------
Purchaser, and no securities of the same class as the Shares have been offered
and sold by Parent within the six-month period immediately prior to the date
hereof.

          (j) The Company is not in violation of any term of its Certificate of
Incorporation or its By-laws, any term of any agreement to which the Company is
a party, or any judgment, decree, order, statute, rule or regulation to which
the Company is subject, that would have a material adverse effect on the
condition, financial or otherwise, prospects or operations of the Company.  The
Company has delivered to Purchaser true and complete copies of its Certificate
of Incorporation and By-laws, as in effect on the date hereof.

          (k) The execution, delivery and performance by the Company of this
Agreement, and the issuance, sale and delivery of the Shares will not violate
any provision of law, the Certificate of Incorporation or By-laws of the Company
or any order, judgment or decree of any court or any governmental agency, or
conflict with, result in a breach of, or constitute a default under, any
indenture, agreement or other instrument by which the Company, or any of its
respective assets, is bound, or result in the creation or imposition of any
Encumbrance on any of the assets of the Company.

          (l) There are no actions, suits, proceedings or investigations pending
or threatened against the Company or its Subsidiaries, and the Company is not
aware of any basis for the foregoing except for an action pending in Supreme
Court, Monroe County, New York titled ACC Corp., et al v. Arunas A. Chesonis,
                                      ---------------------------------------
Richard Ottalagana, John Baron, PaeTec Corporation, and PaeTec Communications,
------------------------------------------------------------------------------
Inc. (Index No. 7466-98).  A copy of the complaint in this action has been
----
furnished to Purchaser.  The Company is not a party to or subject to the
provisions of any order, writ, injunction, judgment or decree of any court or
governmental agency.

          (m) The Company is insured with reputable insurers against all risks
normally insured against by companies in similar lines of business, and all of
the insurance policies

                                       4
<PAGE>

maintained by the Company are in full force and effect. A schedule listing all
insurance policies that are material to the business of the Company has been
furnished to Purchaser. The Company is not in default under any such policy. All
insurance policies maintained by the Company will remain in full force and
effect and may reasonably be expected to be renewed on comparable terms
following consummation of the transactions contemplated by this Agreement
(subject to continuing compliance with the applicable terms thereof and any
right of insurers to terminate without cause), and the Company has received no
notice or other indication from any insurer or agent of any intent to cancel or
not so renew any of such insurance policies.

          (n) The Company does not have employment agreements with any of its
employees.  Since its inception, the Company has not experienced any labor
disputes, union organization attempts or any work stoppage due to labor
disagreements in connection with its business.  There is no labor strike,
dispute, request for representation, slowdown or stoppage actually pending or
threatened against or affecting the Company or any of the Subsidiaries.  All
workers' compensation and unemployment compensation insurance premiums due have
been fully paid or accrued in the Company's financial statements.

          (o) All employee benefit plans within the meaning of Section 3(3) of
the Employment Retirement Income Security Act of 1974, as amended, and the
related regulations and published interpretations ("ERISA"), are in full
compliance with the applicable provisions of ERISA (as amended through the date
of this Agreement), the regulations and published authorities thereunder, and
all other laws applicable with respect to all such employee benefit plans,
agreements and arrangements.  The Company has performed all of its obligations
under all such plans, agreements and arrangements.  To the best knowledge of the
Company, there are no actions (other than routine claims for benefits) pending
or threatened against such plans or their assets, or arising out of such plans,
agreements or arrangements, and, to the best knowledge of the Company, no facts
exist which could give rise to any such Actions.

          (p) All group health plans of the Company and any Subsidiary have been
operated in compliance with the group health plan continuation coverage
requirements of Section 162(k) of the Internal Revenue Code to the extent such
requirements are applicable.

          (q) There has been no act or omission by the Company or any Subsidiary
that has given rise to or may give rise to fines, penalties, taxes, or related
charges under Section 502(c) or (k) or Section 4071 of ERISA or Chapter 43 of
the Internal Revenue Code.

          (r) The Company has not issued to any other holder of the securities
of the Company registration rights that are superior to the rights set forth in
Section 5 of this Agreement.  Except as set forth in Schedule 1 or in Section 5,
---------                                            ----------       ---------
the Company has not agreed to register any of its capital stock under the
Securities Act or under any state securities or "blue sky" law.

          (s) The proceeds from the sale of the Shares will be used by the
Company to fund expansion of the Company's switched-based telecommunications
business including the purchase of equipment, the opening of new sales offices,
for additional working capital, and for general corporate purposes.

                                       5
<PAGE>

          (t) The financial statements of the Company for the period ended
September 30, 1998, compiled by the Company, a copy of which is attached hereto
as Exhibit A, were prepared from the books and records of the Company and fairly
   ---------
sets forth the financial position of the Company, subject to the qualifications
contained therein.

          (u) No Person (as defined in the Loan Agreement) has, or as a result
of the transactions contemplated hereby will have, any right, interest or valid
claim against or upon the Company for any commission, fee or other compensation
as a finder or broker, or in any similar capacity.

          (v) Each of the representations and warranties contained in Sections
3.03, 3.04, 3.06, 3.07, 3.08, 3.09, 3.10, 3.12, 3.13, 3.14, 3.15, 3.16, 3.18,
3.20, 3.21, 3.23 and 3.24 of the Loan Agreement are hereby incorporated herein
by reference with the same effect as if set forth herein in their entirety.

          (w) The representations and warranties in this Agreement and in any
writing furnished or to be furnished by or on behalf of the Company pursuant
hereto or in connection herewith, including any representations and warranties
incorporated herein or therein by reference, do not contain and will not contain
any untrue statement of a material fact and do not omit and will not omit to
state any material fact required to make the statements herein or therein
contained, in the light of the circumstances under which they were made, not
misleading.  No report, financial statement, exhibit or schedule furnished by or
on behalf of the Company to Purchaser in connection with the negotiation of this
Agreement and any other agreement or instrument related hereto, nor any other
information required to be furnished hereby or thereby, contains any material
misstatement of fact or omits to state any material fact necessary to make the
statements therein, in the light of the circumstances under which they were
made, not misleading.

     5.   Piggy-Back Registration Rights.
          ------------------------------

          (a) If at any time or from time to time the Company shall determine to
register any of its equity securities, either for its own account or the account
of a security holder or holders (other than a registration of securities
relating solely to employee benefit plans or to effect a merger or other
reorganization), the Company will promptly give to Purchaser written notice
thereof and, upon the written request of Purchaser, include in such registration
(and any related qualification under blue sky laws or other compliance), and in
any underwriting involved therein, all the Shares specified in the written
request made within 15 days after receipt of such written notice from the
Company.

          (b) If the registration of which the Company gives notice is for a
registered public offering involving an underwriting, the Company shall so
advise Purchaser as a part of the written notice given to Purchaser.  In such
event the right of Purchaser to registration pursuant to this Section shall be
conditioned upon Purchaser's participation in such underwriting, and the
inclusion of the Shares in the underwriting shall be limited to the extent
provided herein.  Purchaser (together with the Company and the other holders
distributing their securities through such underwriting) shall enter into an
underwriting agreement in customary form with the managing underwriter selected
for such underwriting by the Company.  Notwithstanding any

                                       6
<PAGE>

other provision of this Section, if the managing underwriter determines that
marketing factors require a limitation of the number of shares to be
underwritten, the managing underwriter may exclude some or all of the Shares or
securities of other holders of similar registration rights from such
registration. The Company shall so advise Purchaser and other stockholders
distributing their securities through such underwriting, and the number of
Shares or securities of other holders of similar registration rights that may be
included in the registration and underwriting, as determined by the managing
underwriter, shall be allocated on a pro rata basis. If Purchaser disapproves of
the terms of any such underwriting, Purchaser may elect to withdraw therefrom by
written notice to the Company and the managing underwriter. Any securities
excluded or withdrawn from such underwriting shall be withdrawn from such
registration, and shall continue to be subject to the terms of this Section.

          (c) If the Company hereafter grants rights to any shareholder to have
its shares registered under the Securities Act, such grant of rights shall
expressly be subject to the following "cut back" provision:

          "If the managing underwriter of any offering of the Company's
          securities determines that marketing factors require a limitation of
          the number of shares to be underwritten, the managing underwriter may
          exclude some or all of the shares of the party to whom registration
          rights are granted or securities of other holders of similar rights
          from such registration."

          (d) The Company shall have the right to terminate or withdraw any
registration initiated by it under this Section prior to the effectiveness of
such registration whether or not Purchaser has elected to include securities in
such registration.

          (e) All expenses associated with the registration (including, without

limitation, registration, qualification and filing fees, printing expenses, blue
sky fees, and fees and disbursements of counsel and accountants for the Company)
shall be borne by the Company.  Underwriters' discounts and related charges,
shall be borne by Purchaser pro rata in proportion to the number of securities
being registered.

          (f) In the case of each registration under this Section, the Company
will:

              (i)    prepare and file a registration statement with respect to
such securities and use its best efforts to cause such registration statement to
become and remain effective for at least 45 days or until the distribution
described in the registration statement has been completed, whichever first
occurs;

              (ii)   furnish to Purchaser a reasonable number of copies of the
registration statement, any amendment or supplement thereto, any preliminary or
final prospectus, any prospectus supplement, any correspondence with the
Commission regarding such documents, and such other documents as Purchaser may
reasonably request in order to facilitate the public offering of the Shares;

              (iii)  use its best efforts to register and qualify the securities
covered by such registration statement under such other securities or blue sky
laws of such jurisdictions as shall be reasonably requested by Purchaser,
provided that the Company shall not be required in

                                       7
<PAGE>

connection therewith or as a condition thereto to qualify as a foreign
corporation or as a dealer in securities or to file a general consent to service
of process in any such states or jurisdictions in which it has not already done
so and except as may be required by the Securities Act; and

              (iv)  otherwise take such other actions as are reasonably required
to comply with all applicable rules and regulations of the Commission, and make
available to its securities holders, as soon as reasonably practicable (but not
earlier than such information would be required to be filed with the Commission
under Sections 13, 14 or 15(d) of the Securities Exchange Act of 1934, as
amended (the "Exchange Act")), an earnings statement covering the period of at
least twelve months beginning with the first month of the first fiscal quarter
after the effective date of such registration statement, which earnings
statement shall satisfy the provisions of Section 11(a) of the Securities Act.

          (g) The Company will indemnify Purchaser and each person, if any, who
controls Purchaser within the meaning of the Securities Act, against all
expenses, claims, losses, damages or liabilities (or actions in respect
thereof), arising out of or based on any untrue statement (or alleged untrue
statement) of a material fact contained in any registration statement,
prospectus, offering circular or other document, or any amendment or supplement
thereto, incident to any such registration, or based on any omission (or alleged
omission) to state therein a material fact required to be stated therein or
necessary to make the statements therein, in light of the circumstances in which
they were made, not misleading, or any violation by the Company of the
Securities Act, the Exchange Act, any state securities law or any rule or
regulation promulgated under such laws applicable to the Company in connection
with any such registration, qualification or compliance, and the Company will
reimburse Purchaser for any legal and any other expenses reasonably incurred, as
such expenses are incurred, in connection with investigating, preparing or
defending any such claim, loss, damage, liability or action, provided that the
Company will not be liable in any such case to the extent that any such claim,
loss, damage, liability or expense arises out of or is based on any untrue
statement or omission, or alleged untrue statement or omission, made in reliance
upon and in conformity with written information relating to Purchaser furnished
to the Company specifically for inclusion in the registration statement by an
instrument duly executed by Purchaser.

          (h) Purchaser will, if any of the Shares are included in the
securities as to which such registration is being effected, indemnify the
Company, each of its directors and officers, each underwriter, if any, of the
Company's securities covered by such a registration statement against all
claims, losses, damages and liabilities (or actions in respect thereof) arising
out of or based on any untrue statement (or alleged untrue statement) of a
material fact contained in any such registration statement, prospectus, offering
circular or other document, or any omission (or alleged omission) to state
therein a material fact required to be stated therein or necessary to make the
statements therein not misleading, and will reimburse the Company, Purchaser,
such directors, officers, persons, underwriters or control persons for any legal
or any other expenses reasonably incurred, as such expenses are incurred, in
connection with investigating or defending any such claim, loss, damage,
liability or action, in each case to the extent, but only to the extent, that
such untrue statement (or alleged untrue statement) or omission (or alleged
omission) is made in such registration statement, prospectus, offering circular
or other document in reliance upon and in conformity with written information
relating

                                       8
<PAGE>

to Purchaser furnished to the Company specifically for inclusion in the
registration statement by an instrument duly executed by Purchaser and stated to
be specifically for use therein, provided that in no event shall any indemnity
under this Section exceed the net proceeds from the offering received by
Purchaser.

          (i) If for any reason the indemnity set forth in paragraphs (f) or (g)
above is unavailable or insufficient to hold harmless an indemnified party in
respect of any losses, claims, damages, liabilities or expenses (or actions in
respect thereof), then the indemnifying party shall contribute to the amount
paid or payable by the indemnified party as a result of such losses, claims,
damages, liabilities or expenses (or actions in respect thereof) in such
proportion as is appropriate to reflect the relative fault of the indemnifying
party on the one hand and the indemnified party on the other hand in connection
with statements or omissions which resulted in such losses, claims, damages,
liabilities or expenses (or actions in respect thereof), as well as any other
relevant equitable considerations.  The relative fault shall be determined by
reference to, among other things, whether the untrue or alleged untrue statement
of a material fact or the omission or alleged omission to state a material fact
relates to information supplied by the indemnifying party or the indemnified
party and the parties' relative intent, knowledge, access to information and
opportunity to correct or prevent such untrue statement or omission.
Notwithstanding the foregoing, Purchaser shall not be required to contribute any
amount in excess of the amount it would have been required to pay to an
indemnified party if the indemnity under paragraph (h) above was available.  No
person guilty of fraudulent misrepresentation (within the meaning of Section
11(f) of the Securities Act) shall be entitled to contribution from any person
who was not guilty of such fraudulent misrepresentation.

          (j) Purchaser shall furnish to the Company such information regarding
Purchaser, the Shares held by Purchaser, and the distribution proposed by
Purchaser as the Company may reasonably request in writing and as shall be
reasonably required in connection with any registration referred to in this
Agreement.

          (k) The registration rights granted to Purchaser in this Section shall
expire (a) at such time (if ever) as Purchaser is free to sell the Shares under
Rule 144 promulgated under the Securities Act (or any successor thereto) without
limitation as to volume or manner of sale restrictions, and (b) Shares held by
Purchaser constitute less than one percent (1%) of the outstanding shares of the
common stock of the Company.  The foregoing notwithstanding, Purchaser's
registration rights under this Section 4 shall expire after the Company has
offered Purchaser the cumulative opportunity to register all of the Shares in
two registered offerings, irrespective of whether Purchaser elects to
participate in these registrations.

          (l) In connection with the preparation and filing of each registration
statement, or amendment or supplement thereto, under the Securities Act, the
Company will grant Purchaser an opportunity to review and comment on such
registration statement, or amendment or supplement thereto; provided, however,
                                                            --------  -------
that Purchaser's comments on such registration statement, amendment or
supplement shall be limited to information pertaining to Purchaser; provided,
                                                                    --------
further, that Purchaser shall conclude any review under this paragraph within
-------
five business days of its receipt of such registration statement, amendment or
supplement.

                                       9
<PAGE>

     6.   Affirmative Covenants:  The Company covenants and agrees that so long
          ---------------------
as Purchaser shall hold at least 1% of the outstanding common stock of the
Company:

          (a) The Company will maintain its corporate existence in good standing
and comply with all applicable laws and regulations of the United States or of
any state or states thereof or of any political subdivisions thereof and of any
government authority where failure to so comply would have a material adverse
impact on the Company or its business or operations.

          (b) The Company will keep books of record and account in which full,
true and correct entries are made of the respective dealings, business and
affairs of the Company and its Subsidiaries, in accordance with generally
accepted accounting principles.  The Company will employ certified public
accountants who are "independent" within the meaning of the accounting
regulations of the Commission.  The Company will have annual audits made by such
independent public accountants in the course of which such accountants shall
make such examinations, in accordance with generally accepted auditing
standards, as will enable them to give such reports or opinions with respect to
the financial statements of the Company and its Subsidiaries as will satisfy the
requirements of the Commission in effect at such time with respect to reports or
opinions of accountants.

          (c) The Company shall pay, indemnify and hold harmless Purchaser from
and against all transfer, stamp, documentary and other taxes, assessments and
charges (including interest and penalties) imposed by any governmental body or
agency in the State of New York by reason of the execution and delivery of this
Agreement or the issuance or delivery of the Shares.

     7.   Legend.  Each certificate for Shares owned by Purchaser shall bear the
          ------
following legend:

          The shares represented by this certificate have not been registered
          under the Securities Act of 1933, as amended, and may not be
          transferred in the absence of such registration unless the Company
          receives an opinion of counsel reasonably acceptable to it stating
          that such sale or transfer is exempt from registration.

Notwithstanding the foregoing, such restrictive legend requirements shall
terminate when the Company shall have received either a no-action letter from
the Commission or an opinion of counsel reasonably satisfactory in form and
substance to the Company that such legend is not required in order to ensure
compliance with the Securities Act.  Whenever the restrictions imposed by this
Section shall terminate, as hereinabove provided, Purchaser shall be entitled to
receive from the Company, at the Company's expense, a new certificate
representing the Shares not bearing the restrictive legend set forth above.

     8.   Share Adjustment
          ----------------

          (a) If the Company hereafter issues Common Shares (as defined below)
for a purchase price (calculated in accordance with paragraph (c) of this
Section) less than $2.50 per share, the Company shall issue to Purchaser
additional shares of Class A Common Stock, such that the total of such
additional shares and the shares purchased hereunder shall equal the total

                                       10
<PAGE>

number of shares that would have been issued to Purchaser at such lower price
per share for the Purchase Price (as defined in Section 1), with such issuance
                                                ---------
of additional shares to be at no cost to Purchaser.  Example.  The total price
for 600,000 shares of Class A Common Stock at $2.50 per share is $1,500,000.  If
the Company hereafter issues Common Shares for $2.00 per share, the Company
shall issue 150,000 additional shares of Class A Common Stock to Purchaser.
($1,500,000 / 2.0 = 750,000 minus 600,000 = 150,000).

          (b) The provisions for share adjustment in paragraph (a) of this
Section shall not apply to (i) the issuance of additional shares of Class A
Common Stock by the Company to its employees either directly or under the
Company's 1998 Incentive Compensation Plan, or (ii) to shares issued or issuable
by the Company as consideration for the acquisition by the Company of capital
stock or assets of another business entity or in connection with a merger or
consolidation, or to the acquisition of real or tangible property for the
Company in arms length transactions with unrelated third parties.

          (c) "Common Shares" shall mean all shares of Class A Common Stock, any
shares of Class A Common Stock which the Company has committed to issue or sell,
any warrants, options or other rights to subscribe for or purchase Class A
Common Stock or any equity securities convertible into or exchangeable for
shares of Class A Common Stock, whether or not the right to purchase, exchange
or convert thereunder are immediately exercisable.  In measuring the purchase
price of Common Shares for the purposes of paragraph (a) of this Section, the
price per share for each Common Share shall equal the sum of (i) the total
amount received or receivable by the Company as consideration for the issue or
sale of such Common Share plus (ii) the amount of any additional consideration
payable to the Company upon the conversion or exchange of such Common Share.

     9.  Notices. All notices, requests and other communications provided for
         -------
herein shall be in writing, and shall be deemed to have been made or given when
delivered, or mailed postage prepaid, or sent by telex, telegram or telecopier:

          (a)       if to the Company, to:

                    290 Woodcliff Drive
                    Fairport, New York  14550
                    Attention:  Vice President - Finance
                    Telecopy:   (716) 340-2563

                         with a copy to:

                    290 Woodcliff Drive
                    Fairport, New York  14550
                    Attention:  General Counsel
                    Telecopy:   (716) 340-2563

          (b)       if to Purchaser, to:

                    Two Gatehall Drive
                    Parsippany, New Jersey 07054

                                       11
<PAGE>

                    Attention:  Vice President/Media & Communications

                         with a copy to:

                    John M. O'Hare, Esq.
                    Sidley & Austin
                    One First National Plaza
                    Chicago, Illinois 60603
                    Telecopy: (312) 853-7036

     10.  No Public Announcement.  Except as may be required by law, neither
          ----------------------
Purchaser nor the Company will issue any press release or, make any public
announcement concerning the transactions contemplated by this Agreement without
the prior consent or approval of the other party.

     11.  Miscellaneous.

          (a) Any provision of this Agreement may be modified or amended only
upon the written consent of the Company and Purchaser.  Any provision of this
Agreement may be waived if, but only if, such waiver is in writing and is signed
by the Company and Purchaser.  The waiver of any provision of this Agreement, or
of any breach of this Agreement, shall not constitute a subsequent waiver of any
provision or breach.  No failure or delay by the Company or Purchaser in
exercising any right, power or privilege hereunder shall operate as a waiver
thereof, nor shall any single or partial exercise thereof preclude any other or
further exercise thereof or the exercise of any other right, power or privilege.

          (b) The representations, warranties, agreements and covenants shall
survive the execution of this Agreement, the purchase of the Shares contemplated
hereby and any disposition thereof, notwithstanding any investigation made at
any time by any of the parties hereto.  Except as expressly provided herein, the
representations and warranties contained in paragraphs (a), (d), (f) and (g) of
Section 4 and in the first sentence of paragraph (c) of Section 4 shall remain
---------                                               ---------
in full force and effect with respect to Purchaser for as long as Purchaser
shall beneficially own any Shares and with respect to any permitted assignee of
Purchaser, to the extent so assigned, for as long as such assignee shall
beneficially own any Shares.

          (c) This Agreement shall be governed by and construed in accordance
with the substantive laws of the State of New York, as applied to contracts made
and performed within the State of New York, without regard to principles of
conflict of laws, except as to matters of corporate governance, which shall be
interpreted in accordance with the General Corporation Law of the State of
Delaware.

                                       12
<PAGE>

          (d) This Agreement shall be freely assignable by the parties hereto
and shall be binding upon, inure to the benefit of and be enforceable by the
parties hereto and their respective successors and assigns.  No transfer of
Shares by Purchaser shall constitute an assignment by Purchaser of its right
hereunder in the absence of a written assignment by Purchaser of such rights.
Purchaser shall notify the Company of any such assignment of its rights
hereunder.

          (e) This Agreement and the Loan Agreement, including the Schedules and
Exhibits referred to herein or therein, contain the entire understanding of the
parties hereto with regard to the subject matter contained herein and supersedes
all prior letters, agreements, covenants, communications, understandings,
representations, or warranties, whether oral or written, by any officer,
employee, or representative of either party.

          (f) This Agreement may be executed in any number of counterparts, each
of which shall be an original, with the same effect as if the signatures thereto
and hereto were upon the same instrument.

                                       13
<PAGE>

          The parties' assent to the terms of this Agreement is confirmed by
their signatures below.

                                    PAETEC CORP.

                                    By:   /s/ Arunas A. Chesonis
                                        ------------------------------
                                          Name: Arunas A. Chesonis
                                          Title: President

                                     AT&T COMMERCIAL FINANCIAL
                                          CORPORATION

                                    By:   /s/ Michael V. Monahan
                                        ------------------------------
                                          Name: Michael V. Monahan
                                          Title: Vice President

                                       14<PAGE>

                                                                  Exhibit 10.5.2

                  FIRST AMENDMENT TO STOCK PURCHASE AGREEMENT

          THIS FIRST AMENDMENT TO STOCK PURCHASE AGREEMENT (this "Amendment") is
made as of this 4th day of February 2000 by and between PaeTec Corp., a Delaware
corporation (the "Company"), and Newcourt Commercial Finance Corp. (the
"Purchaser").

                                    RECITALS
                                    --------

          A.  The Company and the Purchaser (formerly known as AT&T Commercial
Finance Corporation) are parties to a Stock Purchase Agreement dated as November
16, 1998 (the "Stock Purchase Agreement").

          B.  The Board of Directors of the Company has authorized the issuance
and sale (the "Series A Preferred Stock Placement") of 134,000 shares of a new
series of preferred stock of the Company, designated the Series A Convertible
Preferred Stock, to the purchasers (the "Purchasers") listed on the Schedule of
Purchasers to, and pursuant to the terms and conditions of, an Equity Purchase
Agreement (the "Purchase Agreement").

          C.  As a condition to the consummation of the Series A Preferred Stock
Placement, the Purchasers have required that the Company and the Purchaser amend
the Stock Purchase Agreement to clarify that, to the extent that any securities
are required to be excluded from a registration pursuant to the "cut-back"
provisions of the piggyback registration rights granted to the Purchaser
pursuant to the Stock Purchase Agreement, the securities to be included in such
registration shall be determined on a pro rata basis among the holders of shares
                                      --- ----
participating in the offering pursuant to registration rights granted by the
Company, based on the number of shares of common stock requested to be included
by each such holder in such registration.

          D.  The parties hereto desire to amend the Stock Purchase Agreement to
induce the Purchasers to consummate the Series A Preferred Stock Placement.

                                   AGREEMENT
                                   ---------

          1.  Defined Terms.  All capitalized terms used in this Amendment
              -------------
without definition shall have the meanings given to such terms in the Stock
Purchase Agreement.
<PAGE>

          2.  Amendment of Section 5(b).  The fourth and fifth sentences of
              -------------------------
Section 5(b) of the Stock Purchase Agreement are hereby deleted and replaced and
superseded in their entirety with the following sentence:

     "Notwithstanding any other provision of this Section 5, if the managing
     underwriter advises in writing the Company and the Purchaser that marketing
     factors require a limitation of the number of shares of common stock to be
     underwritten and sold in such offering, the managing underwriter may
     exclude some or all of the shares of common stock to be sold in such
     offering from such registration, and the shares to be included in such
     registration shall be allocated pro rata among the holders of shares
                                     --- ----
     participating in the offering pursuant to registration rights granted by
     the Company (including demand and piggyback registration rights), based on
     the number of shares of common stock requested to be included by each
     holder in such registration."

All other terms and conditions of the Stock Purchase Agreement remain in full
force and effect.

          3.  Binding Effect.  This Amendment shall be binding upon and inure to
              --------------
the benefit of the parties hereto and their heirs, executors, administrators,
successors and assigns.

          4.  Governing Law.  This Amendment shall be governed by, and construed
              -------------
and enforced in accordance with, the laws of the State of New York, except that
if any provision of this Amendment or any part of any such provision would be
illegal, invalid or enforceable under such laws in connection with a suit or
proceeding validly instituted in another jurisdiction, then the laws of such
other jurisdiction shall govern insofar as is necessary to sustain the legality,
validity or enforceability of such provision or any part of such provision.

          5.  Captions.  Captions to the Sections in this Amendment are for the
              --------
convenience of the parties only and shall not affect the meaning or
interpretation of this Amendment.

          6.  Enforceability and Interpretation.  It is the intention of the
              ---------------------------------
parties to this Amendment that the terms and provisions contained in this
Amendment shall be enforceable to the fullest extent permitted by law.  If any
term or provision of this Amendment or the application thereof to any Person or
circumstance is construed to be illegal, invalid or unenforceable, in whole or
in part, then such term or provision shall be construed in such a manner as to
permit its enforceability under applicable law to the fullest extent permitted
by such law.  In any case, the remaining terms and provisions of this Amendment
or the application

                                       2
<PAGE>

thereof to any Person or circumstance, except those terms and provisions which
have been held illegal, invalid or unenforceable, shall remain in full force and
effect.

          7.  Counterparts.  This Amendment may be executed in one or more
              ------------
counterparts, each of which shall be deemed an original, but all of which
together shall constitute one and the same instrument.

          8.  Additional Documents.  Each party hereto agrees to execute any and
              --------------------
all documents, instruments, certificates and communications deemed to be
necessary or advisable by the Company to effectuate the purposes of this
Amendment.

                           [signature page follows]

                                       3
<PAGE>

          IN WITNESS WHEREOF, the parties hereto have executed and delivered
this Amendment with full force and effect as of the day and year first written
above.

                            PAETEC CORP.

                            By:    /s/ Timothy J. Bancroft
                                 ---------------------------------------
                            Its:    Vice President, Finance
                                    ------------------------------------

                            NEWCOURT COMMERCIAL FINANCE CORP.

                            By:    /s/ Charles Brown
                                 ---------------------------------------
                            Its:    V. P.
                                    ------------------------------------

                                       4

Source: [{"source": "alea-institute/alea-institute/kl3m-data-edgar-agreements/train-00007-of-00352.parquet"}, [{"source": "alea-institute/alea-institute/kl3m-data-edgar-agreements/train-00007-of-00352.parquet"}]]