* Net up 18 pct to 644 mln euros; analyst consensus was 454 mln
* Q4 buoyed by customers taking early delivery of Q1 orders
* Q1 sales outlook dips; strength seen in 2018 second half
* ASML shares surge to all-time record above 161 euros (Adds CEO comments; stock gains; analyst reaction)
AMSTERDAM/FRANKFURT, Jan 17 (Reuters) - ASML, a leading supplier of equipment to the world's biggest chipmakers, reported fourth-quarter net profit that far exceeded expectations after some customers requested early delivery of products to satisfy booming demand.
The Dutch maker of lithography systems said on Wednesday its outlook for 2018 had been bolstered by a growing backlog of orders. Its products play a decisive role in shrinking the size of chips so as to cram ever more circuits onto them.
Net profit for the Oct.-Dec. 2017 period rose to 644 million euros ($788 million) from 524 million euros a year earlier and against 454 million euros seen in an analysts' poll for Reuters.
"Due to industry strength, some customers requested earlier shipments of their lithography systems," Chief Executive Peter Wennink said in a statement. "For 2018 we expect continued solid growth of sales and profitability."
Shares of ASML, Europe's second-largest tech stock by market capitalisation, rose almost 7 percent following the report, and by 1440 GMT traded 5 percent higher at 161.70 euros. They have tripled in price over the past five years.
Financial analysts, even bearish ones, hailed the 2017 results as "way above expectations" in the words of broker Liberum, which has a "sell" rating on ASML.
Wennink said in a phone interview that demand was outpacing its capacity to build and that customers were indicating this would continue, especially in the second half of 2018. This has yet be reflected in ASML's order book, he added.
Wennink dismissed any risk that security flaws revealed in Intel and other computer chips this month may affect his customers' upgrade plans, adding he was confident the industry could solve these issues in the short to medium term.
"I don't see any impact on ASML either directly or indirectly," he said.
ASML's lithography machines, which can cost 100 million euros apiece, help chipmakers, including Samsung, Intel and TSMC, to lay out the circuitry that go into most computers, phones, servers and memory devices.
ASML is increasingly dominating its nearest rival in lithography, Japan's Nikon.
Sales of 2.56 billion euros were well ahead of the company's own forecast of 2.1 billion euros, and ASML said it saw net sales of 2.2 billion euros in the first quarter of 2018.
Memory chip prices rose around 60 percent in 2017 and continue to remain strong, powering capital spending in the sector, analysts said. Fifty-three percent of revenue came from memory chipmakers in the fourth quarter, ASML said.
The world's biggest chipmaker, Samsung, spooked some investors last week with an outlook that suggested the boom in memories used in smartphones could end sooner than expected. However, ASML remains insulated as an estimated three-quarters of its memory sales comes from a different type of memory - so-called DRAM - that remains in hot demand.
Wennink refused to be drawn on whether ASML's lower than expected first-quarter revenue outlook could be made up once again by pulling in or shipping second-quarter orders earlier.
Separately, ASML said it appointed Roger Dassen as new CFO to replace Wolfgang Nickl, who is leaving in April to become CFO of Germany's Bayer. Dassen is a former head of accountancy firm Deloitte in the Netherlands.
ASML's order backlog grew to 6.7 billion euros, from 5.7 billion at the end of September. That includes 10 orders of its newest, most expensive machine.
Wennink said ASML would propose an annual dividend of 1.40 euros in 2017 from 1.20 euros in 2016, and a share buyback program of 2.5 billion euros over the 2018-2019 period. ASML only completed 900 million euros of its previous 1.5 billion euro buyback program.
Wennink said the fledgling Chinese chip industry continued to grow rapidly and he expected to ship chip-making tools to five different Chinese companies in 2018. ($1 = 0.8169 euros) (Reporting by Toby Sterling and Eric Auchard; Editing by Gopakumar Warrier and Gareth Jones)