Before a nonjudicial foreclosure sale, the borrower/owner filed a worngful foreclosure suit against the deed of trust beneficiary and recorded a lis pendens.  This case holds that the purchaser at the nonjudicial foreclosure sale who thereafter brought an unlawful detainer action against the borrower/owner was wrongly awarded judgment because it did not prove it duly perfected title given the lis pendens which had not been expunged nor had the wrongful foreclosure suit of which it gave notice been resolved. To perfect title, the purchaser had either to expunge the lis pendens or resolve the wrongful foreclosure lawsuit. Under Dr. Leevil, LLC v. Westlake Health Care Center (2018) 6 Cal.5th 474, to serve a three day notice to quit as a prelude to bringing an unlawful detainer action under CCP 1161a, the purchaser must take all steps to make the title perfect, “i.e., to convey to the purchaser that which he has purchased, valid and good beyond all reasonable doubt.” A cloud on title that cannot be litigated in an unlawful detainer action as an impediment to the perfection of title, one that must be cleared before the purchaser may serve a notice to quit and commence an unlawful detainer proceeding.  The lis pendens is such a cloud.  However, an unlawful detainer cause of action is not a mandatory cross-complaint to a wrongful foreclosure lawsuit since unlawful detainer is a special proceeding and requiring that proceeding to be litigated in the context of an ordinary civil action would thwart the legislative goal of speedy resolution of unlawful detainer claims.