Julius Caesar ruled as a dictator from 49 B.C. to 44 B.C., when he was assassinated. Caesar was actually elected as ruler twice. The first time in 49 B.C. lasted only a few days until he assured he was re-elected as consul for a second term, after which he stepped down.
The year after Caesar stepped down, he was elected again for a term of one year. During this time Caesar killed the king of Pontus, dealt with Pompey, his previous rivals, senate support and defeated Cato. After such a prosperous year, he was named dictator for 10 years. He was elected again as a consul during his dictatorship, but his growing power and enemies brought around his demise in 44 B.C. His assassination has had many plays and movies written about it, by such famous people as William Shakespeare.