Luke states that Mary and Joseph went to Bethlehem because of a census that took place while Quirinius was governor of Syria (2:1-5).
In those days a decree went out from Caesar Augustus that all the world should be registered. This was the first registration when Quirinius was governor of Syria. And all went to be registered, each to his own town.
Now Josephus, the first century historian, records Quirinius conducting a census in A.D. 6. You can find it in book 18 of the Antiquities.
NOW Cyrenius, a Roman senator, and one who had gone through other magistracies, and had passed through them till he had been consul, and one who, on other accounts, was of great dignity, came at this time into Syria, with a few others, being sent by Caesar to he a judge of that nation, and to take an account of their substance. Coponius also, a man of the equestrian order, was sent together with him, to have the supreme power over the Jews. Moreover, Cyrenius came himself into Judea, which was now added to the province of Syria, to take an account of their substance, and to dispose of Archelaus's money; but the Jews, although at the beginning they took the report of a taxation heinously, yet did they leave off any further opposition to it, by the persuasion of Joazar, who was the son of Beethus, and high priest; so they, being over-pesuaded by Joazar's words, gave an account of their estates, without any dispute about it.
But that leads to a problem. Both Luke and Matthew place Jesus' birth before the death of King Herod in 4 B.C (Matt. 2:1, Luke 1:5). An unmistakable difference of 9 years.
Has Luke simply made an historical error? And if not, why does he mention the census conducted by Quirinus?