After attacking Bill O’Reilly’s history last week, I’ll defend his sociology this week. On Monday, MSNBC’s Lawrence O’Donnell ridiculed Fox News’ O’Reilly for saying that single motherhood is responsible for the the high black crime rate.

O’Reilly said, quite correctly: “The reason there is so much violence and chaos in the black precincts is the disintegration of the African-American family. Right now, about 73 percent of all black babies are born out of wedlock. That drives poverty. And the lack of involved fathers leads to young boys growing up resentful and unsupervised. And it has nothing to do with slavery. It has everything to do with you Hollywood people and you derelict parents.”

O’Donnell mocked O’Reilly, saying that “the struggles of black America have nothing to do with slavery in Bill O’Reilly’s very narrow and uneducated mind.” He then droned on about some paper Daniel Patrick Moynihan wrote about slavery.

Take that, Bill O’Reilly!

While I’m sure that was a fascinating little monograph Moynihan wrote about slavery, O’Donnell cited nothing in it that contradicted O’Reilly. Apparently, Moynihan found that American slavery was “the most awful the world has ever known.” True, but unfortunately that has nothing to do with what O’Reilly said.

It doesn’t even sound like Moynihan was attributing black illegitimacy to slavery. O’Donnell’s point was simply that the great Moynihan had written about slavery being bad, so all discussion must end.

Fortunately, all discussion did not end for Erol Ricketts, a (black) demographer and sociologist with the Rockefeller Foundation who researched the origin of black female-headed families in the 1980s. His studies showed that the black family was thriving from the late 19th century through most of the 20th century.

You don’t get much poorer, deprived or discriminated against than being a black person in America just a generation out of slavery.

Examining nearly a century of U.S. census reports, Ricketts found that between 1890 and 1950, blacks had higher marriage rates than whites. Until 1970, black women were more likely to get married than white women — and that was despite the high mortality rates among black men, leaving fewer available for marriage. In three of four decennial years between 1890 and 1920, black men out-married white men.

Whatever else may cause illegitimacy and its associated problems, it isn’t poverty, discrimination, lack of education, unemployment or slavery. Black Americans had all those handicaps — and yet they still had strong families and low crime rates from 1890 until the 1960s.

But in the ’60s, liberals decided it would be a great idea to start subsidizing illegitimacy.

Everyone knew — even FDR’s secretary of labor, Francis Perkins, knew — that granting widows’ benefits to unmarried women with illegitimate children would have disastrous consequences. An early 20th-century social welfare advocate, Homer Folks, warned back in 1914 that to grant pensions for “desertion or illegitimacy would, undoubtedly, have the effect of a premium upon these crimes against society.”

But under President Lyndon Johnson, that’s exactly what the government did. The “suitable home” requirements for welfare — such as having a husband — were jettisoned by liberal know-it-alls in the federal Bureau of Public Assistance. As a result, illegitimacy went through the roof, particularly among blacks, our most vulnerable fellow citizens.

In 1970, for the first time, the marriage rate for black women fell below 70 percent. But even then, a majority of black children were still living with both parents. By 2010, only 30.1 percent of blacks above the age of 15 were married, compared to 52.7 percent of whites.

Liberals keep using the bad consequences of their policies as an argument for more of the same policies. Government subsidies to unwed mothers increase the illegitimacy rate, which in turn leads to poverty, criminal behavior and more illegitimacy. So Democrats reverse cause and effect to claim it’s the poverty that causes illegitimacy and then demand more payments to unwed mothers.

But we know poverty does not cause illegitimacy. The black experience from 1890 to 1960 proves it. It’s the reverse, just as Bill O’Reilly said. If African-Americans started marrying again at their pre-Great Society rates, it would wipe out the entire black “culture of poverty.”

Nor is there a speck of evidence that poverty causes crime. Murder is the only crime that has been reliably tracked since 1900. From the turn of the century right up to the early 1930s, the murder rate rose steadily, with a few peaks and valleys. Then it began a noticeable decline right at the beginning of the Great Depression, remaining low until the mid-1940s, and rising again only at the end of the Depression.

The converse happened during the economic boom of the “go-go” ’80s. The homicide rate shot up in the 1970s and stayed high until the mid-1990s. Both the homicide rate and general crime rate have remained at all-time lows through the economic wasteland of the Obama years. (Thanks to Republican crime policies.)

So while it’s fascinating that Moynihan concluded that slavery was awful (I think we knew that!), O’Reilly is absolutely right that it’s illegitimacy driving the black crime rate.