Undated (AP) _ American Telephone & Telegraph Co. on Thursday announced the first annual loss in its 104-year history, reflecting a previously announced charge for modernization that reduced net income by $3.96 billion.

Nynex Corp., one of the companies spun off from AT&T in the 1984 breakup, separately reported a 6.1 percent rise in its fourth-quarter profit.

AT&T's results, which it projected last month, resulted from a $6.72 billion pre-tax charge in the fourth quarter that covers the cost of scrapping outdated equipment and moving, retiring or laying off 16,000 employees.

AT&T said it had a net loss of $3.34 billion for the three months ended Dec. 31, compared with profits of $498 million, or 46 cents a share, a year earlier. Revenue rose to $9.21 billion from $8.65 billion a year earlier.

For all of 1988, AT&T said it lost $1.67 billion compared to a profit of $2.04 billion, or $1.88 a share, a year earlier. Revenue rose to $35.2 billion from $33.8 billion.

Nynex, based in White Plains, N.Y., said its earnings in the quarter ended Dec. 31 rose to $342.2 million, or $1.74 a share, from $322.5 million, or $1.59 a share, a year earlier. Revenue rose to $3.24 billion from $3.10 billion.

For all of 1988, Nynex said its earnings rose to $1.32 billion, or $6.63 a share, from $1.28 billion, or $6.26 a share, a year earlier. Revenue rose to $12.7 billion from $12.1 billion in 1987.