WASHINGTON — Holiday shipping and the 2012 election helped the Postal Service stem its losses, but the agency’s financial woes continued in the first quarter, which ended Dec. 31.

The Postal Service posted a $1.3 billion loss in the first quarter, compared with a $3.3 billion loss over the same period the previous year. The agency said the first quarter has traditionally been one of its strongest periods.

Total mail volume continued to decline, however. It was 43.5 billion pieces for the quarter, down from 43.6 billion for the same period a year earlier, according to agency officials.

Revenue from first-class mail, which provides the bulk of the revenue for the Postal Service, declined $237 million, or 3.1 percent, from the same period the previous year, with a decrease in volume of 834 million pieces, or 4.5 percent. Revenue from advertising mail increased $141 million, or 3.1 percent, in the first quarter compared with the same period a year earlier on a volume increase of 783 million pieces, or 3.6 percent. The increase is largely attributable to official election mail and political campaign advertising related to the presidential and Congressional elections mailed during the quarter, which began Oct. 1.