Julius Cæsar allowed a statue of himself with the inscription, Deo Invicto (Latin "to the unconquered god") in 44 BC. In the same year, Cæsar declared himself dictator for life. Julius Cæsar's nephew and heir, Augustus Cæsar caused a temple to be built in Rome to Divus Julius, the "divine", or "deified" Julius.
Augustus and his immediate successors avoided claiming the status of a deity in their own lives, although, as the son of the deified Julius, he was already titled divi filius - son of a god. The notion that the Roman emperor was a living god was ridiculed even by some Romans at first. However, deceased emperors were the subject of worship during this period—at least, the ones who did not become so unpopular with their subjects that they were assassinated.
After Hadrian, the power of the emperors had become so absolute and consolidated that the later emperors could claim divinity during their own lives. During the persecution of Christians that took place in the Roman empire, the imperial cult became an important aspect of that persecution. To the extent that participation in the imperial cult became a loyalty test, the imperial cult was a particularly aggressive sort of civil religion.
Loyal citizens of the Empire were expected to make a periodic offering of incense to the genius, or tutelary spirit, of the Emperor, and upon doing so they received a certificate that they had in fact demonstrated their loyalty by sacrificing. Christians, of course, refused to worship the Emperor, considering the cult to be idolatry. The sacrifice was used as a law enforcement tool to ferret them out.
The imperial cult was abandoned when Constantine I became Emperor.