When the late-night television comedians joke about Fannie Mae and Freddie Mac — the two government-sponsored housing finance agencies that almost went belly-up during the housing crisis — you know they have reached the public consciousness.

But there are two other federal housing programs hardly anyone knows about. One is Farmer Mac, a government-sponsored enterprise similar to Fannie and Freddie; the other is from the Department of Agriculture.

Both are aimed at rural homebuyers, but don't let that word fool you: "Rural" may be much closer than you think.

Among Farmer Mac's programs is one that targets buyers who want to move to the country and do a bit of farming, either full-scale or on the side. If you qualify, you are eligible for mortgages of up to $12 million (or $30 million on high-value properties of less than 1,000 acres).

There are no minimum or maximum acreage requirements. But if the property is less than five acres — not a lot of ground in some suburban markets — a minimum of $5,000 in annual gross sales of agriculture products must be documented. There is no such requirement for properties larger than five acres.

Known more formally as the Federal Agricultural Mortgage Corp., Farmer Mac was created by Congress in 1988 to build a secondary market for agriculture real estate and rural housing mortgages, thereby increasing the availability of long-term credit for ranchers, farmers and rural homebuyers.

It doesn't make loans directly to borrowers. Rather, it purchases loans made by local lenders. And among the products it buys are part-time farm/residential mortgages made to so-called hobby farmers.

Eligible properties must be owner-occupied, single-family detached residences or second homes with enough acreage to support agricultural production. There are no geographic restrictions, but the property can't be just a house on a large lot, or off in the woods somewhere.

A variety of loans are available, including both fixed-rate and adjustable mortgages, with terms from seven to 30 years. For loans up to $5 million, the loan-to-value ratio cannot exceed 70%. Borrowers who want more than that will have to pony up 40% as a down payment.

To qualify, you must be a U.S. citizen or permanently admitted for U.S. residency.

To find a local lender that sells its mortgages to Farmer Mac, go to FarmerMac.com and fill out the pre-application form under the "borrowers" tab. An employee will contact you to help you find a lender serving your area.

For borrowers who want to live in the country but don't want to be farmers, the Agriculture Department's Rural Housing Service offers a variety of loans, grants and loan guarantees to build, buy or improve both single- and multifamily properties.

Actually, "rural" is something of a misnomer when it comes to the USDA, because eligible properties can be much closer to big-city markets than you might think. To find out if the property you are considering is eligible, go to eligibility.sc.egov.usda.gov and enter the address.

Under the RHS Section 502 Direct Loan Program, low- and moderate-income borrowers are eligible for 100% mortgages with no money down. Applicants must have an adjusted income that is no greater than the low-income limit for their area, and be unable to obtain a mortgage from other sources.

Generally, houses can be no more than 1,800 square feet with a market value that does not exceed the applicable area loan amount.

The payback period for Section 502 mortgages is 33 years, though applicants with very low incomes who can't afford that extended loan term can stretch the loan out to 37 years.

Under the Guaranteed Loan Program, RHS provides a 90% loan note guarantee to approved lenders, to reduce the risk of extending 100% loans to eligible rural homebuyers and those who want to build, rehabilitate, improve or relocate a dwelling in an eligible rural area.

There are limitations based on income and family size. But folks who have "moderate incomes" — up to 115% of the U.S. median — qualify. In the Chicago area, for example, the limit ranges from $87,400 for a one-person household to $115,350 for households with eight members. And in the Sarasota-North Port area on Florida's southwest coast, the ceiling ranges from $75,650 for single borrowers to $99,850 for eight-member households.

Guaranteed loans can be used for a new or existing residential property to be used as a permanent residence, occupied by the borrower. Closing costs and reasonable and customary expenses associated with the purchase may be included in the transaction.

Lew Sichelman is an independent journalist who has been covering the housing and mortgage markets for more than 40 years.