 With establishment of the Azerbaijan Democratic Republic on May 28, 1918 Rafibeyli was given several posts within the government.On June 17, 1918 when the second cabinet of ADR convened, he was appointed to lead the new Ministry of Healthcare.While in office, he established several hospitals and medical laboratories throughout the country and opened the office of Red Crescent in Azerbaijan.