The stock markets advanced modestly Friday after another late rally, despite higher oil prices and a lower-than-expected increase in the gross domestic product. The major indicators ended the week higher for the first time in more than a month.

Analysts said late-day buying is common at the end of the month as mutual funds and large investors adjust portfolios and purchase options.

The GDP rose 3 percent in the second quarter; Wall Street had been expecting 3.8 percent. That led to light volume and a narrow trading range, as many investors kept to the sidelines.

The Dow Jones industrial average rose 10.47, or 0.1 percent, to 10,139.71. The Dow was up for the fourth straight session, the first time that has happened since early April.

Broader stock indicators were narrowly higher. The Standard & Poor's 500-stock index was up 1.29, or 0.1 percent, at 1101.72, and the Nasdaq composite index gained 6.30, or 0.3 percent, to 1887.36.

All three indicators ended the week higher. The Dow gained 1.8 percent after five weeks of losses, the S&P 500 rose 1.4 percent after six losing weeks, and the Nasdaq was up 2.1 percent after four down weeks.

The market ended July sharply lower. The Dow fell 2.8 percent, the S&P 500 was down 3.4 percent and the Nasdaq suffered a 7.8 percent loss. Concerns over third- and fourth-quarter earnings, oil prices and economic health outweighed an otherwise strong second-quarter earnings season, and July's losses could spill into August as economic issues take over the debate.

Retailer Target will generate $1.65 billion in cash with the sale of its struggling Mervyn's department stores to an investment consortium. Target was down 73 cents, at $43.60.

ChevronTexaco climbed 17 cents, to $95.65 as it announced a doubling of its second-quarter profit from a year ago. The petroleum giant blew past Wall Street expectations by $1.12 cents per share, though that figure includes 79 cents per share in one-time benefits.

Other Indicators

* The New York Stock Exchange composite index rose 9.08, to 6403.15; the American Stock Exchange index rose 10.74, to 1240.34; and the Russell 2000 index of smaller-company stocks rose 1.46, to 551.29.

* Advancing issues outnumbered declining ones by 7 to 4 on the NYSE, where trading volume fell to 1.3 billion shares, from 1.52 billion on Thursday. On the Nasdaq Stock Market, advancers outnumbered decliners by 4 to 3 and volume totaled 1.5 billion, down from 1.69 billion.

* The price of the Treasury's 10-year note rose $7.50 per $1,000 invested, and its yield fell to 4.48 percent, from 4.58 percent on Thursday.

* The dollar fell against the Japanese yen and rose against the euro. In late New York trading, a dollar bought 111.22 yen, down from 112.10 late Thursday, and a euro bought $1.2020, down from $1.2035.

* Light, sweet crude oil for September delivery settled at $43.80, up $1.05, on the New York Mercantile Exchange.

* Gold for current delivery rose to $391.00 a troy ounce, from $387.00 on Thursday, on the New York Mercantile Exchange's Commodity Exchange.