* Facility in south India shut after fire on Sunday

* Plant fire damaged at least six machines -govt source

* Pegatron blames accident at 'small switchboard'

CHENGALPATTU, India, Sept 27 (Reuters) - A factory fire at iPhone assembler Pegatron India was sparked by a short-circuit after an electrical switch was left on, following testing of the devices as they were being put together, two sources briefed on the matter told Reuters.

The lapse at key Apple supplier Pegatron's only factory in India, located in the southern state of Tamil Nadu, has cost three straight days of lost production, with no clarity on when operations might resume.

After Reuters sent queries to Pegatron for this report, the firm told the Taiwan stock exchange on Wednesday that "a small switchboard experienced an accident" at the factory on Sunday, but did not provide further details.

In a statement on Monday, Pegatron said there were no injuries in the fire, which it described as a "spark incident" whose cause would be determined, while adding that it did not have significant impact on finances and operations.

Apple did not respond to a request for comment and has not yet commented on the matter. Its representatives have been in touch with Pegatron after the incident, Reuters has reported.

A senior Tamil Nadu government source, and another industry source, briefed on the matter, detailed how Sunday's events unfolded. Both spoke on condition of anonymity as the matter is sensitive.

After putting together about 70 iPhone parts, workers at the Pegatron plant charge the device batteries up to a level of 50% at a charging rack, before installing software, the state government source said.

However, a switch on one such rack was not turned off after the end of Saturday's night shifts, the source added, causing overheating and eventually a spark that set alight a foam sheet used to protect new mobile phones against scratches.

The next day was a holiday, with just a few maintenance workers on duty, but the "fire could have been nipped in the bud had there been more workers in the facility," the government source said.

One smartphone industry source with direct knowledge said the charging racks at the Pegatron plant are typically switched off after three Saturday shifts end early on Sundays.

Firemen scrambled to douse the flames in response to a call received at about 8:50 p.m. on Sunday, said fire official V. Veeraraghavan. Domestic TV images showed black smoke billowing from the facility.

The fire damaged some machines, said the government source and another source with direct knowledge, who spoke on condition of anonymity. The government official estimated six machines were damaged, but did not say what type they were.

About 8,000 people work on the assembly line at the Pegatron facility, which sprawls across 39,000 sq. m. (420,000 sq ft) in the city of Chengalpattu. It does not make the iPhone 15 but assembles older variants.

The plant turns out 5 million phones a year, according to a board placed outside it , which accounts for 10% of Apple's India production, with Foxconn facilities in south India making up a majority.

(Reporting by Praveen Paramasivam; Additional reporting by Munsif Vengattil in Bengaluru, Faith Hung and Ben Blanchard in Taipei; Editing by Aditya Kalra and Clarence Fernandez)