The benchmark 100-share index of the Pakistan Stock Exchange ended 0.11 percent, or 40.02 points, higher at 37,392.29, also an all-time closing high. Earlier in the day, the index rose as much as 0.5 percent to a record high of 37,539.
Nearly 103,000 shares changed hands, compared with the 30-day average of 151,000 shares.
Shares of oil and gas companies led the gains, with Pakistan Petroleum Ltd rising 4.1 percent, as oil prices hit their highest in eight months, buoyed by the dollar nearing one-month lows and by falling Nigerian oil output after a spate of attacks on infrastructure.
However, most cement stocks declined on a government proposal to raise the excise duty on the sector by 1 rupee per kg. D G Khan Cement Co Ltd fell 0.58 percent, while Maple Leaf Cement Factory Ltd dropped 0.3 percent.