(KJV) Deutoronomy 10:1-4
1 At that time the LORD said unto me, Hew thee two tables of stone like unto the first, and come up unto me into the mount, and make thee an ark of wood. 2 And I will write on the tables the words that were in the first tables which thou brakest, and thou shalt put them in the ark. 3 And I made an ark of shittim wood, and hewed two tables of stone like unto the first, and went up into the mount, having the two tables in mine hand. 4 And he wrote on the tables, according to the first writing, the ten commandments, which the LORD spake unto you in the mount out of the midst of the fire in the day of the assembly: and the LORD gave them unto me.
(KJV) Exodus 34:27
27 And the LORD said unto Moses, Write thou these words: for after the tenor of these words I have made a covenant with thee and with Israel.
In Exodus it seems Moses wrote the second set of tablets but in Deutoronomy it was the finger of God that did it.
How can we understand the seemingly contradictory texts above?