Two police officers have been granted bail after facing a Queensland court charged with raping a woman while on duty.

The men, aged 28 and 29, did not enter a plea when they faced the Mackay Magistrates Court on Friday morning.

Both men have been charged with five counts of rape and one count each of assault with intent to commit rape and deprivation of liberty.

The alleged incident involving two on-duty officers and a woman took place on Sunday morning, and was reported to police on Monday afternoon.

Loading

The officers have been suspended from duty.

No other information regarding the alleged assault has been released.