The troops, serving with the UN Mission in South Sudan (UNMISS) were alerted about the incident in the South Sudanese town of Pibor in the early hours of Thursday morning, according to information released here.
When they arrived at the compound, about three kilometres from the UN base, about 150 shots were fired by the attackers using automatic weapons.
The peacekeepers responded by firing warning shots into the air which caused the two groups of attackers to flee.
The humanitarian workers were successfully evacuated from the compound unharmed as the gunfire continued.
More From This Section
They were taken back to the UNMISS base for medical checks and support.
As the incident unfolded, the Indian battalion was alerted to an attempt to infiltrate another humanitarian compound nearby.
They responded quickly by sending a team of peacekeepers who once again forced the offenders to flee.
The peacekeeping contingent sent troops to check on other humanitarian compounds in the area and conducted a patrol of the town later that morning.
As of June this year, a total of 7676 Indian peacekeepers are serving in UNMISS, including 6849 troops and 760 police.