The short answer
Petrarch never wrote the exact phrase “Dark Ages.” What people usually mean by a Petrarch quote is a line about darkness. He described the centuries after classical Rome as dim, and he hoped the light of learning could return. The lines most often cited come from his Latin epic Africa and from a 1367 defense of his work.
The passage in Africa
Africa is a Latin epic about the Roman general Scipio Africanus, written around 1343. In Book IX, Petrarch imagines that once the gloom has cleared, later generations may again see the brilliance of the ancients. The tone is hopeful rather than bitter. The darkness is a condition that might pass.
The 1367 Apologia
In 1367 Petrarch wrote a defense of his work against an anonymous critic from France. In it he describes learned people as surrounded by darkness and dense gloom. The theme is much the same as in Africa: learning has been overwhelmed, and the light of the classical world is what is missing.
Why the wording is hard to pin down
Petrarch’s ideas are spread across letters, poems and treatises, and most modern readers meet them in translation or in later summaries. That is why a single quote is hard to name. Theodor Mommsen’s 1942 article “Petrarch’s Conception of the ‘Dark Ages’” is a standard study of the idea and a good starting point for checking the wording.
What the image meant to him
The contrast was about books, Latin and the loss of ancient learning. Petrarch admired Cicero and other classical writers, and the darkness he described was a lack of that taste and scholarship. It was not a full verdict on daily life in the centuries he had in mind. Historians still argue about what centuries were the Middle Ages, and his contrast shaped that debate.
Using the quote carefully
If you write about Petrarch, cite the work rather than a single sentence, and give the date. Avoid presenting “dark ages” as his own words. The accurate line is that he described the post-Roman centuries as dark compared with classical antiquity, and that he hoped his own time could bring learning back.