Canada’s trade surplus remained at $7.17 billion for a second straight month in October, Statistics Canada said Wednesday.

Exports rose 1% to a record high value of $40.2 billion, marking the eighth consecutive rise in shipments out of the country.

Imports also grew in October, rising by 1.2% to $33 billion. Gains in machinery and equipment and auto parts were the chief drives in import growth, Statistics Canada said.

Trade with the United States saw the biggest increases, as exports rose by 2.3% and imports grew by 1.5%. Rising energy prices have been responsible for the rise in the value of exports to the United States since early 2005.

In October, the main contributor to the rising shipments to the United States was the increase in natural gas exports. Shipments of lumber and sawmill products, passenger vehicles, and live cattle also increased.