Sept 17 (Reuters) - U.S. energy firms this week added oil and natural gas rigs for a second week in a row although the number of offshore units in the Gulf of Mexico remained unchanged after Hurricane Ida slammed into the coast over two weeks ago.

Fourteen offshore Gulf of Mexico rig shut two weeks ago due to Ida remained shut, energy services firm Baker Hughes Co said in its closely followed report on Friday. Last week, four of those offshore rigs returned to service. The oil and gas rig count, an early indicator of future output, rose nine to 512 in the week to Sept. 17, its highest since April 2020, Baker Hughes said.

That puts the total rig count up 257 rigs, or 101%, over this time last year.

U.S. oil rigs rose 10 to 411 this week, their highest since April 2020, while gas rigs fell one to 100.

U.S. crude futures were trading under $72 a barrel on Friday, heading for the fourth straight weekly gain thanks to the slow recovery in output after two hurricanes in the U.S. Gulf of Mexico.

Overall, the oil and gas rig count has increased for 13 months in a row through August as rising oil prices have prompted drillers to return to the wellpad. (Reporting by Scott DiSavino in New York and Brijesh Patel in Bengaluru Editing by Marguerita Choy)