(Adds peso closing level)
BUENOS AIRES, July 7 (Reuters) - Argentina's peso currency strengthened on Friday after touching historic lows the prior session amid one of the worst routs of President Mauricio Macri's term, but traders warned volatility could continue through key midterm elections in October.
Banks stepped in to sell dollars after the peso fell as low as 17.38 per U.S. dollar on Thursday, traders said, taking profits after the currency weakened 7.0 percent during nine straight losing sessions beginning on June 23, the longest such streak since February 2016.
The peso closed 0.71 percent stronger on Friday at 16.98 to the greenback. During the week the Argentine currency weakened 2.06 percent.
Macri let the exchange rate float shortly after taking office in December 2015, prompting a sharp depreciation against the dollar after years of currency controls put in place by former populist President Cristina Fernandez had kept the peso artificially strong.
The decline in recent weeks came as a flood of foreign currency that entered the country thanks to debt sales eased up along with inflows from a tax amnesty program. Investors also hedged their bets by buying dollars as the elections approach, in which Fernandez could win a Senate seat.
While the drop has prompted calls for central bank action amid concern it could worsen inflation seen above 20 percent this year, analysts said the currency had been stronger than expected in the first half of the year and remained far from official expectations for an average of 17.92 in 2017.
"With the dollar in the neighborhood of 17 pesos, there is only a partial correction of that lag," said Jorge Vasconcelos, an economist at the Fundacion Mediterranea think tank.
Officials have repeatedly played down concerns about the dollar exchange rate, noting that a floating exchange rate can protect the economy from external shocks and that the peso's sharp moves against the dollar contrast with more modest moves against other currencies.
"There's no reason to worry when the dollar moves," Treasury Minister Nicolas Dujovne told reporters on Friday at the G-20 summit in Hamburg, according to local newspaper La Nacion. "The exchange rate will have less and less impact on price formation." (bit.ly/2tUsdz2) (Reporting by Luc Cohen, Walter Bianchi and Hugh Bronstein; Editing by Sandra Maler)