TMZ has learned David Hasselhoff and ex-wife Pamela Bach have finally reached a deal on the financial issues and division of assets in their divorce. Long time coming!

We're told the couple and their lawyers met last Friday and hammered out a settlement in a meeting that lasted well into the evening. As part of the deal, they will share 50/50 custody of daughters Taylor and Hayley. They also reached an agreement on spousal and child support, but those terms were not disclosed.

The couple's Encino, Calif. home will be put on the market. David had allowed Pamela to live there after she was ordered to move out, but they have now agreed to sell the property.