(Adds comments from company and details of earnings)
MEXICO CITY, April 27 (Reuters) - Mexico's biggest retailer, Wal-Mart de Mexico, posted a 6.1 percent year-on-year rise in first-quarter profit on Thursday, while warning it was unclear how recent factors threatening to dampen consumer confidence would play out.
The net profit of 7.130 billion pesos ($381 million) came in somewhat under the 7.203 billion forecast by the market, according to Thomson Reuters I/B/E/S.
The company, known as Walmex, said its revenue rose by 7.2 percent to 132.56 billion pesos, offsetting higher costs.
In a bid to maintain its customer base and gain market share, Walmex said it had kept price increases at its stores below inflation.
Sales rose despite political and economic uncertainty, including concerns over the future of the North American Free Trade Agreement and foreign investment, the company said.
"These events have begun to have repercussions," the company said in its earnings report, noting it might face higher costs for supplies, production, operations and distribution that could have a material impact.
Higher gasoline prices and the depreciation of the peso over the past year also weighed on the outlook for retailers, Walmex said.
But the opening of 13 new stores, compared with six in the same quarter in 2016, and a 36 percent surge in its e-commerce sales helped bolster profits, the company said.
"Despite the start of a challenging year ... we kept our growth momentum and more importantly, the preference of our clients," Walmex said.
Higher electricity prices as well as protests and fires at some stores trimmed profits, and Walmex said it would work to boost usage of renewable energy to rein in operating costs.
Walmex also operates in the Central American nations of Costa Rica, Guatemala, Honduras, El Salvador and Nicaragua.
The company said it aims to double overall sales in a decade, and drive faster growth in profits by cutting costs.
$1 = 18.7275 on March 31 Reporting by Noe Torres and Mitra Taj; Editing by Tom Brown