Updated from 8:42 a.m. EDT

Metromedia Fiber Network

(MFNX)

said Tuesday that it had agreed to buy privately held

TST Recommends

SiteSmith

, an Internet infrastructure management services company, in an all-stock deal valued at close to $1.36 billion.

Under the terms of the deal, SiteSmith shareholders will receive between 55 million and 62.5 million shares of White Plains, N.Y.-based Metromedia, depending on the share price of Metromedia stock over a period of time prior to the closing. If the average price for the 20 trading days ended four days prior to the deal's closing is greater than or equal to $27.27 a share, SiteSmith shareholders will receive 55 million shares. If it is less than or equal to $24, SiteSmith stockholders will receive 62.5 million shares. If the average price is between $24 and $27.27, they will receive a number of shares equal to $1.5 billion.

Metromedia finished Tuesday regular trading down $2.19, or 10%, at $19.63.

SiteSmith, based in Santa Clara, Calif., operates offices in eight locations in the U.S. and Europe.